From b60704d8b7ce4172d5b5a3ba930301258d846a48 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 14 Jan 2015 16:49:34 +0100 Subject: docs: Amended docs for conversion routines --- host/lib/convert/convert_common.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'host/lib') 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) -- cgit v1.2.3