#include <cstdint>
#include <sys/param.h>
Go to the source code of this file.
|
static std::uint16_t | bswap16 (std::uint16_t x) |
|
static std::uint32_t | bswap32 (std::uint32_t x) |
|
static std::uint64_t | bswap64 (std::uint64_t x) |
|
static void | bswap16x8 (std::uint16_t *source) |
|
static void | bswap32x4 (std::uint32_t *source) |
|
static void | bswap64x2 (std::uint64_t *source) |
|
std::uint8_t | ntoh (std::uint8_t x) |
|
std::uint16_t | ntoh (std::uint16_t x) |
|
std::uint32_t | ntoh (std::uint32_t x) |
|
std::uint64_t | ntoh (std::uint64_t x) |
|
std::uint8_t | hton (std::uint8_t x) |
|
std::uint16_t | hton (std::uint16_t x) |
|
std::uint32_t | hton (std::uint32_t x) |
|
std::uint64_t | hton (std::uint64_t x) |
|
void | ntoh (std::uint8_t *x) |
|
void | ntoh (std::uint16_t *x) |
|
void | ntoh (std::uint32_t *x) |
|
void | ntoh (std::uint64_t *x) |
|
void | hton (std::uint8_t *x) |
|
void | hton (std::uint16_t *x) |
|
void | hton (std::uint32_t *x) |
|
void | hton (std::uint64_t *x) |
|
std::uint8_t | bswap (std::uint8_t x) |
|
std::uint16_t | bswap (std::uint16_t x) |
|
std::uint32_t | bswap (std::uint32_t x) |
|
std::uint64_t | bswap (std::uint64_t x) |
|
void | bswap (std::uint8_t *x) |
|
void | bswap (std::uint16_t *x) |
|
void | bswap (std::uint32_t *x) |
|
void | bswap (std::uint64_t *x) |
|
◆ USE_SYS_PARAM_H
◆ bswap() [1/8]
void bswap |
( |
std::uint16_t * |
x | ) |
|
|
inline |
332 {
334}
static void bswap16x8(std::uint16_t *source)
Definition: Endianness.h:168
References bswap16x8().
◆ bswap() [2/8]
std::uint16_t bswap |
( |
std::uint16_t |
x | ) |
|
|
inline |
315 {
317}
static std::uint16_t bswap16(std::uint16_t x)
Definition: Endianness.h:107
References bswap16().
◆ bswap() [3/8]
void bswap |
( |
std::uint32_t * |
x | ) |
|
|
inline |
336 {
338}
static void bswap32x4(std::uint32_t *source)
Definition: Endianness.h:179
References bswap32x4().
◆ bswap() [4/8]
std::uint32_t bswap |
( |
std::uint32_t |
x | ) |
|
|
inline |
319 {
321}
static std::uint32_t bswap32(std::uint32_t x)
Definition: Endianness.h:112
References bswap32().
◆ bswap() [5/8]
void bswap |
( |
std::uint64_t * |
x | ) |
|
|
inline |
340 {
342}
static void bswap64x2(std::uint64_t *source)
Definition: Endianness.h:186
References bswap64x2().
◆ bswap() [6/8]
std::uint64_t bswap |
( |
std::uint64_t |
x | ) |
|
|
inline |
323 {
325}
static std::uint64_t bswap64(std::uint64_t x)
Definition: Endianness.h:119
References bswap64().
◆ bswap() [7/8]
void bswap |
( |
std::uint8_t * |
x | ) |
|
|
inline |
327 {
328
329 static_cast<void>(x);
330}
◆ bswap() [8/8]
std::uint8_t bswap |
( |
std::uint8_t |
x | ) |
|
|
inline |
◆ bswap16()
static std::uint16_t bswap16 |
( |
std::uint16_t |
x | ) |
|
|
inlinestatic |
107 {
108 return (((x& std::uint16_t{0x00FF}) << 8) |
109 ((x& std::uint16_t{0xFF00}) >> 8));
110 }
Referenced by bswap(), and bswap16x8().
◆ bswap16x8()
static void bswap16x8 |
( |
std::uint16_t * |
source | ) |
|
|
inlinestatic |
◆ bswap32()
static std::uint32_t bswap32 |
( |
std::uint32_t |
x | ) |
|
|
inlinestatic |
112 {
113 return (((x& std::uint32_t{0x000000FF}) << 24) |
114 ((x& std::uint32_t{0x0000FF00}) << 8) |
115 ((x& std::uint32_t{0x00FF0000}) >> 8) |
116 ((x& std::uint32_t{0xFF000000}) >> 24));
117 }
Referenced by bswap(), and bswap32x4().
◆ bswap32x4()
static void bswap32x4 |
( |
std::uint32_t * |
source | ) |
|
|
inlinestatic |
◆ bswap64()
static std::uint64_t bswap64 |
( |
std::uint64_t |
x | ) |
|
|
inlinestatic |
119 {
120 return (((x& std::uint64_t{0x00000000000000FF}) << 56) |
121 ((x& std::uint64_t{0x000000000000FF00}) << 40) |
122 ((x& std::uint64_t{0x0000000000FF0000}) << 24) |
123 ((x& std::uint64_t{0x00000000FF000000}) << 8) |
124 ((x& std::uint64_t{0x000000FF00000000}) >> 8) |
125 ((x& std::uint64_t{0x0000FF0000000000}) >> 24) |
126 ((x& std::uint64_t{0x00FF000000000000}) >> 40) |
127 ((x& std::uint64_t{0xFF00000000000000}) >> 56));
128 }
Referenced by bswap(), and bswap64x2().
◆ bswap64x2()
static void bswap64x2 |
( |
std::uint64_t * |
source | ) |
|
|
inlinestatic |
◆ hton() [1/8]
void hton |
( |
std::uint16_t * |
x | ) |
|
|
inline |
296 {
297 hton16x8(x);
298}
◆ hton() [2/8]
std::uint16_t hton |
( |
std::uint16_t |
x | ) |
|
|
inline |
262 {
263 return hton16(x);
264}
◆ hton() [3/8]
void hton |
( |
std::uint32_t * |
x | ) |
|
|
inline |
300 {
301 hton32x4(x);
302}
◆ hton() [4/8]
std::uint32_t hton |
( |
std::uint32_t |
x | ) |
|
|
inline |
266 {
267 return hton32(x);
268}
◆ hton() [5/8]
void hton |
( |
std::uint64_t * |
x | ) |
|
|
inline |
304 {
305 hton64x2(x);
306}
◆ hton() [6/8]
std::uint64_t hton |
( |
std::uint64_t |
x | ) |
|
|
inline |
270 {
271 return hton64(x);
272}
◆ hton() [7/8]
void hton |
( |
std::uint8_t * |
x | ) |
|
|
inline |
292 {
293 hton8x16(x);
294}
◆ hton() [8/8]
std::uint8_t hton |
( |
std::uint8_t |
x | ) |
|
|
inline |
258 {
259 return hton8(x);
260}
◆ ntoh() [1/8]
void ntoh |
( |
std::uint16_t * |
x | ) |
|
|
inline |
280 {
281 ntoh16x8(x);
282}
◆ ntoh() [2/8]
std::uint16_t ntoh |
( |
std::uint16_t |
x | ) |
|
|
inline |
246 {
247 return ntoh16(x);
248}
◆ ntoh() [3/8]
void ntoh |
( |
std::uint32_t * |
x | ) |
|
|
inline |
284 {
285 ntoh32x4(x);
286}
◆ ntoh() [4/8]
std::uint32_t ntoh |
( |
std::uint32_t |
x | ) |
|
|
inline |
250 {
251 return ntoh32(x);
252}
◆ ntoh() [5/8]
void ntoh |
( |
std::uint64_t * |
x | ) |
|
|
inline |
288 {
289 ntoh64x2(x);
290}
◆ ntoh() [6/8]
std::uint64_t ntoh |
( |
std::uint64_t |
x | ) |
|
|
inline |
254 {
255 return ntoh64(x);
256}
◆ ntoh() [7/8]
void ntoh |
( |
std::uint8_t * |
x | ) |
|
|
inline |
276 {
277 ntoh8x16(x);
278}
◆ ntoh() [8/8]
std::uint8_t ntoh |
( |
std::uint8_t |
x | ) |
|
|
inline |
242 {
243 return ntoh8(x);
244}