12 #ifndef ROC_CORE_ENDIAN_OPS_H_
13 #define ROC_CORE_ENDIAN_OPS_H_
15 #include "roc_core/cpu_traits.h"
26 return reverse_octets_(v);
29 #if ROC_CPU_ENDIAN == ROC_CPU_BE
37 return reverse_octets_(v);
41 #if ROC_CPU_ENDIAN == ROC_CPU_BE
44 return reverse_octets_(v);
54 static uint8_t reverse_octets_(uint8_t v);
55 static int8_t reverse_octets_(int8_t v);
56 static uint16_t reverse_octets_(uint16_t v);
57 static int16_t reverse_octets_(int16_t v);
58 static uint32_t reverse_octets_(uint32_t v);
59 static int32_t reverse_octets_(int32_t v);
60 static uint64_t reverse_octets_(uint64_t v);
61 static int64_t reverse_octets_(int64_t v);
62 static float reverse_octets_(
float v);
63 static double reverse_octets_(
double v);
static T swap_native_be(T v)
Swap between native endian and big endian.
static T swap_native_le(T v)
Swap between native endian and little endian.
static T swap_endian(T v)
Swap between endians.
Commonly used types and functions.