30 #ifndef WFIO_BYTESWAP_H 31 #define WFIO_BYTESWAP_H 35 #ifdef WFIO_COMPILER_GCC 36 #define WFIO_INTRINSIC_SWAP_16_ 37 #define WFIO_INTRINSIC_SWAP_32_ 38 #define WFIO_INTRINSIC_SWAP_64_ 56 #ifdef WFIO_COMPILER_GCC 57 return __builtin_bswap16((wfio_sint16_t) src);
59 register wfio_uint8_t tmp;
181 #ifdef WFIO_INTRINSIC_SWAP_32_ 182 #define WFIO_MAYBE_INLINE WFIO_ALWAYS_INLINE 183 #elif !defined(WFIO_DOXYGEN) 184 #define WFIO_MAYBE_INLINE WFIO_DLL 198 #ifdef WFIO_INTRINSIC_SWAP_32_ 200 #ifdef WFIO_COMPILER_GCC 201 return __builtin_bswap32((wfio_sint32_t) src);
316 #ifdef WFIO_INTRINSIC_SWAP_64_ 317 #define WFIO_MAYBE_INLINE WFIO_ALWAYS_INLINE 318 #elif !defined(WFIO_DOXYGEN) 319 #define WFIO_MAYBE_INLINE WFIO_DLL 334 #ifdef WFIO_INTRINSIC_SWAP_64_ 336 #ifdef WFIO_COMPILER_GCC 337 return __builtin_bswap64((wfio_sint64_t) src);
367 wfio_sint64_t* dest,
size_t len);
425 wfio_sint64_t* dest,
size_t len) {
450 #undef WFIO_MAYBE_INLINE WFIO_ALWAYS_INLINE void wfio_swapUI16V2(const wfio_sint16_t *src, wfio_sint16_t *dest, size_t len)
Perform a byte swap on 16-bit unsigned integers in src to be stored in dest.
Definition: byteswap.h:153
#define WFIO_MAYBE_INLINE
Potentially mark this symbol for inlining.
Definition: host.h:466
WFIO_ALWAYS_INLINE void wfio_swapUI64V(wfio_sint64_t *buf, size_t len)
Perform a byte swap on 64-bit unsigned integers in buf.
Definition: byteswap.h:446
WFIO_ALWAYS_INLINE void wfio_swapUI32V2(const wfio_sint32_t *src, wfio_sint32_t *dest, size_t len)
Perform a byte swap on 32-bit unsigned integers in src to be stored in dest.
Definition: byteswap.h:288
WFIO_ALWAYS_INLINE wfio_sint16_t wfio_swapUI16(wfio_sint16_t src)
Perform a byte swap on a 16-bit unsigned integer.
Definition: byteswap.h:130
#define WFIO_DLL
Mark the symbol as an element of the library.
Definition: host.h:397
WFIO_ALWAYS_INLINE wfio_sint64_t wfio_swapUI64(wfio_sint64_t src)
Perform a byte swap on a 64-bit unsigned integer.
Definition: byteswap.h:401
#define WFIO_ALWAYS_INLINE
Mark this symbol to be forced inline.
Definition: host.h:447
WFIO_ALWAYS_INLINE void wfio_swapUI32V(wfio_sint32_t *buf, size_t len)
Perform a byte swap on 32-bit unsigned integers in buf.
Definition: byteswap.h:310
WFIO_MAYBE_INLINE wfio_sint64_t wfio_swapSI64(wfio_sint64_t src)
Perform a byte swap on a 64-bit signed integer.
WFIO_ALWAYS_INLINE void wfio_swapSI32V(wfio_sint32_t *buf, size_t len)
Perform a byte swap on 32-bit signed integers in buf.
Definition: byteswap.h:250
WFIO_ALWAYS_INLINE void wfio_swapSI16V(wfio_sint16_t *buf, size_t len)
Perform a byte swap on 16-bit signed integers in buf.
Definition: byteswap.h:114
WFIO_DLL void wfio_swapSI32V2(const wfio_sint32_t *src, wfio_sint32_t *dest, size_t len)
Perform a byte swap on 32-bit signed integers in src to be stored in dest.
#define WFIO_INLINE
Mark this symbol for inlining.
Definition: host.h:377
WFIO_ALWAYS_INLINE void wfio_swapUI16V(wfio_sint16_t *buf, size_t len)
Perform a byte swap on 16-bit unsigned integers in buf.
Definition: byteswap.h:175
WFIO_ALWAYS_INLINE void wfio_swapSI64V(wfio_sint64_t *buf, size_t len)
Perform a byte swap on 64-bit signed integers in buf.
Definition: byteswap.h:386
WFIO_ALWAYS_INLINE void wfio_swapUI64V2(const wfio_sint64_t *src, wfio_sint64_t *dest, size_t len)
Perform a byte swap on 64-bit unsigned integers in src to be stored in dest.
Definition: byteswap.h:424
WFIO_DLL void wfio_swapSI64V2(const wfio_sint64_t *src, wfio_sint64_t *dest, size_t len)
Perform a byte swap on 64-bit signed integers in src to be stored in dest.
WFIO_MAYBE_INLINE wfio_sint32_t wfio_swapSI32(wfio_sint32_t src)
Perform a byte swap on a 32-bit signed integer.
WFIO_INLINE wfio_sint16_t wfio_swapSI16(wfio_sint16_t src)
Perform a byte swap on a 16-bit signed integer.
Definition: byteswap.h:54
WFIO_ALWAYS_INLINE wfio_sint32_t wfio_swapUI32(wfio_sint32_t src)
Perform a byte swap on a 32-bit signed integer.
Definition: byteswap.h:265
WFIO_DLL void wfio_swapSI16V2(const wfio_sint16_t *src, wfio_sint16_t *dest, size_t len)
Perform a byte swap on 16-bit signed integers in src to be stored in dest.