48 #if defined(_MSC_VER) && (_MSC_VER < 1700) 49 typedef unsigned short uint16_t;
51 # include <inttypes.h> 54 #include <visp3/core/vpConfig.h> 58 #if defined(__GLIBC__) || (defined(__GNUC__) && !defined(__llvm__) && !defined(__MINGW32__) && !defined(__FreeBSD__) && defined(__BYTE_ORDER__)) 60 #if (__BYTE_ORDER == __LITTLE_ENDIAN) 61 #define VISP_LITTLE_ENDIAN 62 #elif (__BYTE_ORDER == __BIG_ENDIAN) 63 #define VISP_BIG_ENDIAN 64 #elif (__BYTE_ORDER == __PDP_ENDIAN) 66 #define VISP_PDP_ENDIAN 69 #error Unknown machine endianness detected. 71 #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) 72 #define VISP_BIG_ENDIAN 73 #elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) 74 #define VISP_LITTLE_ENDIAN 75 #elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || \ 76 defined(__hpux) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__) 78 #define VISP_BIG_ENDIAN 79 #elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || \ 80 defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || \ 81 defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__ANDROID__) 84 #define VISP_LITTLE_ENDIAN 85 #elif defined(WINRT) // For UWP 87 #define VISP_LITTLE_ENDIAN 89 #error Cannot detect host machine endianness. VISP_EXPORT uint16_t reinterpret_cast_uchar_to_uint16_LE(unsigned char *const ptr)
VISP_EXPORT float swapFloat(float f)
VISP_EXPORT uint16_t swap16bits(uint16_t val)
VISP_EXPORT double swapDouble(double d)
VISP_EXPORT uint32_t swap32bits(uint32_t val)