aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/convert/convert_item32.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/lib/convert/convert_item32.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/lib/convert/convert_item32.cpp')
-rw-r--r--host/lib/convert/convert_item32.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/host/lib/convert/convert_item32.cpp b/host/lib/convert/convert_item32.cpp
index 142a842bb..5d8361079 100644
--- a/host/lib/convert/convert_item32.cpp
+++ b/host/lib/convert/convert_item32.cpp
@@ -8,23 +8,25 @@
#include "convert_common.hpp"
#include <uhd/utils/byteswap.hpp>
-#define __DECLARE_ITEM32_CONVERTER(cpu_type, wire_type, xe, htoxx, xxtoh) \
- DECLARE_CONVERTER(cpu_type, 1, wire_type ## _item32_ ## xe, 1, PRIORITY_GENERAL){ \
- const cpu_type ## _t *input = reinterpret_cast<const cpu_type ## _t *>(inputs[0]); \
- item32_t *output = reinterpret_cast<item32_t *>(outputs[0]); \
- xx_to_item32_ ## wire_type<htoxx>(input, output, nsamps, scale_factor); \
- } \
- DECLARE_CONVERTER(wire_type ## _item32_ ## xe, 1, cpu_type, 1, PRIORITY_GENERAL){ \
- const item32_t *input = reinterpret_cast<const item32_t *>(inputs[0]); \
- cpu_type ## _t *output = reinterpret_cast<cpu_type ## _t *>(outputs[0]); \
- item32_ ## wire_type ## _to_xx<xxtoh>(input, output, nsamps, scale_factor); \
+#define __DECLARE_ITEM32_CONVERTER(cpu_type, wire_type, xe, htoxx, xxtoh) \
+ DECLARE_CONVERTER(cpu_type, 1, wire_type##_item32_##xe, 1, PRIORITY_GENERAL) \
+ { \
+ const cpu_type##_t* input = reinterpret_cast<const cpu_type##_t*>(inputs[0]); \
+ item32_t* output = reinterpret_cast<item32_t*>(outputs[0]); \
+ xx_to_item32_##wire_type<htoxx>(input, output, nsamps, scale_factor); \
+ } \
+ DECLARE_CONVERTER(wire_type##_item32_##xe, 1, cpu_type, 1, PRIORITY_GENERAL) \
+ { \
+ const item32_t* input = reinterpret_cast<const item32_t*>(inputs[0]); \
+ cpu_type##_t* output = reinterpret_cast<cpu_type##_t*>(outputs[0]); \
+ item32_##wire_type##_to_xx<xxtoh>(input, output, nsamps, scale_factor); \
}
-#define _DECLARE_ITEM32_CONVERTER(cpu_type, wire_type) \
+#define _DECLARE_ITEM32_CONVERTER(cpu_type, wire_type) \
__DECLARE_ITEM32_CONVERTER(cpu_type, wire_type, be, uhd::htonx, uhd::ntohx) \
__DECLARE_ITEM32_CONVERTER(cpu_type, wire_type, le, uhd::htowx, uhd::wtohx)
-#define DECLARE_ITEM32_CONVERTER(cpu_type) \
+#define DECLARE_ITEM32_CONVERTER(cpu_type) \
_DECLARE_ITEM32_CONVERTER(cpu_type, sc8) \
_DECLARE_ITEM32_CONVERTER(cpu_type, sc16)