aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils/converter_benchmark.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-03-02 15:25:13 -0800
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-03-03 08:51:32 -0600
commit876d4150aa3da531ddd687b48afada6e43f79146 (patch)
treefd72a71419f4cd800d4e500cfcaded4dfc8dc367 /host/utils/converter_benchmark.cpp
parent1393553d623bdf4ba40d5435c9719b6ce990d9ac (diff)
downloaduhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.gz
uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.bz2
uhd-876d4150aa3da531ddd687b48afada6e43f79146.zip
uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
Diffstat (limited to 'host/utils/converter_benchmark.cpp')
-rw-r--r--host/utils/converter_benchmark.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/host/utils/converter_benchmark.cpp b/host/utils/converter_benchmark.cpp
index d00255d0c..f981455ac 100644
--- a/host/utils/converter_benchmark.cpp
+++ b/host/utils/converter_benchmark.cpp
@@ -47,7 +47,7 @@ void configure_conv(
if (in_type == "sc16") {
if (out_type == "fc32") {
std::cout << "Setting scalar to 1./32767." << std::endl;
- conv->set_scalar(1./32767.);
+ conv->set_scalar(1. / 32767.);
return;
}
}
@@ -116,7 +116,8 @@ void init_random_vector_real_int(std::vector<char>& buf_ptr, size_t n_items)
}
// Fill a buffer with increasing numbers
-template <typename T> void init_inc_vector(std::vector<char>& buf_ptr, size_t n_items)
+template <typename T>
+void init_inc_vector(std::vector<char>& buf_ptr, size_t n_items)
{
T* const buf = reinterpret_cast<T* const>(&buf_ptr[0]);
for (size_t i = 0; i < n_items; i++) {
@@ -206,7 +207,8 @@ double run_benchmark(converter::sptr conv,
return benchmark_timer.elapsed();
}
-template <typename T> std::string void_ptr_to_hexstring(const void* v_ptr, size_t index)
+template <typename T>
+std::string void_ptr_to_hexstring(const void* v_ptr, size_t index)
{
const T* ptr = reinterpret_cast<const T*>(v_ptr);
return str(boost::format("%X") % ptr[index]);