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/include/uhd/convert.hpp | 12 +++++++++++- host/include/uhd/utils/byteswap.hpp | 8 +++++++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'host/include') 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 /*! \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 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 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 T htowx(T); } //namespace uhd -- cgit v1.2.3