HPCToolkit
big-endian.h File Reference
#include <stdint.h>
#include <include/hpctoolkit-config.h>
Include dependency graph for big-endian.h:

Go to the source code of this file.

Macros

#define _raw_byte_swap_16(x)
 
#define _raw_byte_swap_32(x)
 
#define _raw_byte_swap_64(x)
 
#define host_to_be_16(x)   _raw_byte_swap_16((uint16_t) (x))
 
#define host_to_be_32(x)   _raw_byte_swap_32((uint32_t) (x))
 
#define host_to_be_64(x)   _raw_byte_swap_64((uint64_t) (x))
 
#define be_to_host_16(x)   host_to_be_16(x)
 
#define be_to_host_32(x)   host_to_be_32(x)
 
#define be_to_host_64(x)   host_to_be_64(x)
 

Macro Definition Documentation

◆ _raw_byte_swap_16

#define _raw_byte_swap_16 (   x)
Value:
( (((x) & 0xff00) >> 8) \
| (((x) & 0x00ff) << 8) )

Definition at line 104 of file big-endian.h.

◆ _raw_byte_swap_32

#define _raw_byte_swap_32 (   x)
Value:
( (((x) & 0xff000000) >> 24) \
| (((x) & 0x00ff0000) >> 8) \
| (((x) & 0x0000ff00) << 8) \
| (((x) & 0x000000ff) << 24) )

Definition at line 108 of file big-endian.h.

◆ _raw_byte_swap_64

#define _raw_byte_swap_64 (   x)
Value:
( (((x) & 0xff00000000000000) >> 56) \
| (((x) & 0x00ff000000000000) >> 40) \
| (((x) & 0x0000ff0000000000) >> 24) \
| (((x) & 0x000000ff00000000) >> 8) \
| (((x) & 0x00000000ff000000) << 8) \
| (((x) & 0x0000000000ff0000) << 24) \
| (((x) & 0x000000000000ff00) << 40) \
| (((x) & 0x00000000000000ff) << 56) )

Definition at line 114 of file big-endian.h.

◆ be_to_host_16

#define be_to_host_16 (   x)    host_to_be_16(x)

Definition at line 152 of file big-endian.h.

◆ be_to_host_32

#define be_to_host_32 (   x)    host_to_be_32(x)

Definition at line 153 of file big-endian.h.

◆ be_to_host_64

#define be_to_host_64 (   x)    host_to_be_64(x)

Definition at line 154 of file big-endian.h.

◆ host_to_be_16

#define host_to_be_16 (   x)    _raw_byte_swap_16((uint16_t) (x))

Definition at line 143 of file big-endian.h.

◆ host_to_be_32

#define host_to_be_32 (   x)    _raw_byte_swap_32((uint32_t) (x))

Definition at line 144 of file big-endian.h.

◆ host_to_be_64

#define host_to_be_64 (   x)    _raw_byte_swap_64((uint64_t) (x))

Definition at line 145 of file big-endian.h.