UHD  003.004.002-0-unknown
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Namespaces | Functions
byteswap.hpp File Reference
#include <uhd/config.hpp>
#include <boost/cstdint.hpp>
#include <uhd/utils/byteswap.ipp>

Go to the source code of this file.

Namespaces

namespace  uhd

Functions

boost::uint16_t uhd::byteswap (boost::uint16_t)
 perform a byteswap on a 16 bit integer
boost::uint32_t uhd::byteswap (boost::uint32_t)
 perform a byteswap on a 32 bit integer
boost::uint64_t uhd::byteswap (boost::uint64_t)
 perform a byteswap on a 64 bit integer
template<typename T >
uhd::ntohx (T)
 network to host: short, long, or long-long
template<typename T >
uhd::htonx (T)
 host to network: short, long, or long-long
template<typename T >
uhd::wtohx (T)
 worknet to host: short, long, or long-long
template<typename T >
uhd::htowx (T)
 host to worknet: short, long, or long-long

Detailed Description

Provide fast byteswaping routines for 16, 32, and 64 bit integers, by using the system's native routines/intrinsics when available.