43 #if defined(_MSC_VER) && (_MSC_VER < 1700)
44 typedef unsigned short uint16_t;
49 #include <visp3/core/vpConfig.h>
53 #if defined(__GLIBC__) || (defined(__GNUC__) && !defined(__llvm__) && !defined(__MINGW32__) && \
54 !defined(__FreeBSD__) && defined(__BYTE_ORDER__))
56 #if (__BYTE_ORDER == __LITTLE_ENDIAN)
57 #define VISP_LITTLE_ENDIAN
58 #elif (__BYTE_ORDER == __BIG_ENDIAN)
59 #define VISP_BIG_ENDIAN
60 #elif (__BYTE_ORDER == __PDP_ENDIAN)
62 #define VISP_PDP_ENDIAN
65 #error Unknown machine endianness detected.
67 #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
68 #define VISP_BIG_ENDIAN
69 #elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
70 #define VISP_LITTLE_ENDIAN
71 #elif defined(__sparc) || defined(__sparc__) || defined(_POWER) || defined(__powerpc__) || defined(__ppc__) || \
72 defined(__hpux) || defined(_MIPSEB) || defined(_POWER) || defined(__s390__)
74 #define VISP_BIG_ENDIAN
75 #elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || \
76 defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || \
77 defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__ANDROID__)
80 #define VISP_LITTLE_ENDIAN
84 #define VISP_LITTLE_ENDIAN
86 #error Cannot detect host machine endianness.
VISP_EXPORT float swapFloat(float f)
VISP_EXPORT uint32_t swap32bits(uint32_t val)
VISP_EXPORT uint16_t reinterpret_cast_uchar_to_uint16_LE(unsigned char *const ptr)
VISP_EXPORT double swapDouble(double d)
VISP_EXPORT uint16_t swap16bits(uint16_t val)