diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-01-14 16:49:34 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-01-14 16:49:34 +0100 |
commit | b60704d8b7ce4172d5b5a3ba930301258d846a48 (patch) | |
tree | 69a88761c2a4f20e25aa23a7ac9168ecc3348648 /host/include | |
parent | ec11128445c00a8340b95dae6ed2d3ab5c7a5976 (diff) | |
download | uhd-b60704d8b7ce4172d5b5a3ba930301258d846a48.tar.gz uhd-b60704d8b7ce4172d5b5a3ba930301258d846a48.tar.bz2 uhd-b60704d8b7ce4172d5b5a3ba930301258d846a48.zip |
docs: Amended docs for conversion routines
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/convert.hpp | 12 | ||||
-rw-r--r-- | host/include/uhd/utils/byteswap.hpp | 8 |
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 |