aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
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/include
parent39d3818a16ca2317ac64118acf5b59696a8723ca (diff)
parentb60704d8b7ce4172d5b5a3ba930301258d846a48 (diff)
downloaduhd-8c73c62b95e12e88a8aa68154cadc024229de6df.tar.gz
uhd-8c73c62b95e12e88a8aa68154cadc024229de6df.tar.bz2
uhd-8c73c62b95e12e88a8aa68154cadc024229de6df.zip
Merge branch 'maint'
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/convert.hpp12
-rw-r--r--host/include/uhd/utils/byteswap.hpp8
2 files changed, 18 insertions, 2 deletions
diff --git a/host/include/uhd/convert.hpp b/host/include/uhd/convert.hpp
index 6ac93fb66..d740d80fb 100644
--- a/host/include/uhd/convert.hpp
+++ b/host/include/uhd/convert.hpp
@@ -46,7 +46,14 @@ namespace uhd{ namespace convert{
private:
//! Callable method: input vectors, output vectors, num samples
- virtual void operator()(const input_type&, const output_type&, const size_t) = 0;
+ //
+ // This is the guts of the converter. When deriving new converter types,
+ // this is where the actual conversion routines go.
+ //
+ // \param in Pointers to the input buffers
+ // \param out Pointers to the output buffers
+ // \param num Number of items in the input buffers to convert
+ virtual void operator()(const input_type& in, const output_type& out, const size_t num) = 0;
};
//! Conversion factory function typedef
@@ -69,6 +76,9 @@ namespace uhd{ namespace convert{
/*!
* Register a converter function.
+ *
+ * Converters with higher priority are given preference.
+ *
* \param id identify the conversion
* \param fcn makes a new converter
* \param prio the function priority
diff --git a/host/include/uhd/utils/byteswap.hpp b/host/include/uhd/utils/byteswap.hpp
index 2b5a46c66..8e3b7dc8a 100644
--- a/host/include/uhd/utils/byteswap.hpp
+++ b/host/include/uhd/utils/byteswap.hpp
@@ -22,10 +22,10 @@
#include <boost/cstdint.hpp>
/*! \file byteswap.hpp
+ *
* Provide fast byteswaping routines for 16, 32, and 64 bit integers,
* by using the system's native routines/intrinsics when available.
*/
-
namespace uhd{
//! perform a byteswap on a 16 bit integer
@@ -44,9 +44,15 @@ namespace uhd{
template<typename T> T htonx(T);
//! worknet to host: short, long, or long-long
+ //
+ // The argument is assumed to be little-endian (i.e, the inverse
+ // of typical network endianness).
template<typename T> T wtohx(T);
//! host to worknet: short, long, or long-long
+ //
+ // The return value is little-endian (i.e, the inverse
+ // of typical network endianness).
template<typename T> T htowx(T);
} //namespace uhd