aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2015-01-14 16:50:26 +0100
committerMartin Braun <martin.braun@ettus.com>2015-01-14 16:50:26 +0100
commit8c73c62b95e12e88a8aa68154cadc024229de6df (patch)
tree1eb6013205a2d8f24ee0ac1eaa920ed4cbb0fa3a /host/lib
parent39d3818a16ca2317ac64118acf5b59696a8723ca (diff)
parentb60704d8b7ce4172d5b5a3ba930301258d846a48 (diff)
downloaduhd-8c73c62b95e12e88a8aa68154cadc024229de6df.tar.gz
uhd-8c73c62b95e12e88a8aa68154cadc024229de6df.tar.bz2
uhd-8c73c62b95e12e88a8aa68154cadc024229de6df.zip
Merge branch 'maint'
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/convert/convert_common.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/host/lib/convert/convert_common.hpp b/host/lib/convert/convert_common.hpp
index ceaa1151c..6c2ea9fec 100644
--- a/host/lib/convert/convert_common.hpp
+++ b/host/lib/convert/convert_common.hpp
@@ -42,6 +42,19 @@
const input_type &inputs, const output_type &outputs, const size_t nsamps \
)
+/*! Convenience macro to declare a single-function converter
+ *
+ * Most converters consist of a single for loop, and can make use of
+ * this macro for declaration and registering.
+ *
+ * Following this macro should be a function block in curly braces
+ * which runs the conversion. Available parameters in this function block
+ * are:
+ * - `inputs`: Vector of pointers to the input data. Size of the vector == `num_in`
+ * - `outputs`: Vector of pointers to where the output data goes. Size of the vector == `num_out`
+ * - `nsamps`: Number of items per input buffer to convert
+ * - `scale_factor`: Scaling factor for float conversions
+ */
#define DECLARE_CONVERTER(in_form, num_in, out_form, num_out, prio) \
_DECLARE_CONVERTER(__convert_##in_form##_##num_in##_##out_form##_##num_out##_##prio, in_form, num_in, out_form, num_out, prio)