Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
Byteswap.h File Reference
#include <cstdint>
Include dependency graph for Byteswap.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  RByteSwap< N >
 Helper templated class for swapping bytes; specializations for N={2,4,8} are provided below. More...
 
struct  RByteSwap< 2 >
 
struct  RByteSwap< 4 >
 
struct  RByteSwap< 8 >
 

Macros

#define R__bswap_16(x)   R__bswap_constant_16(x)
 
#define R__bswap_32(x)   R__bswap_constant_32(x)
 
#define R__bswap_64(x)   R__bswap_constant_64(x)
 
#define R__bswap_constant_16(x)    ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
 
#define R__bswap_constant_32(x)
 
#define Rbswap_16(x)   R__bswap_16(x)
 
#define Rbswap_32(x)   R__bswap_32(x)
 
#define Rbswap_64(x)   R__bswap_64(x)
 

Functions

static uint64_t R__bswap_constant_64 (uint64_t x)
 

Macro Definition Documentation

◆ R__bswap_16

#define R__bswap_16 (   x)    R__bswap_constant_16(x)

Definition at line 67 of file Byteswap.h.

◆ R__bswap_32

#define R__bswap_32 (   x)    R__bswap_constant_32(x)

Definition at line 82 of file Byteswap.h.

◆ R__bswap_64

#define R__bswap_64 (   x)    R__bswap_constant_64(x)

Definition at line 100 of file Byteswap.h.

◆ R__bswap_constant_16

#define R__bswap_constant_16 (   x)     ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))

Definition at line 57 of file Byteswap.h.

◆ R__bswap_constant_32

#define R__bswap_constant_32 (   x)
Value:
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
Double_t x[n]
Definition legend1.C:17

Definition at line 71 of file Byteswap.h.

◆ Rbswap_16

#define Rbswap_16 (   x)    R__bswap_16(x)

Definition at line 105 of file Byteswap.h.

◆ Rbswap_32

#define Rbswap_32 (   x)    R__bswap_32(x)

Definition at line 108 of file Byteswap.h.

◆ Rbswap_64

#define Rbswap_64 (   x)    R__bswap_64(x)

Definition at line 111 of file Byteswap.h.

Function Documentation

◆ R__bswap_constant_64()

static uint64_t R__bswap_constant_64 ( uint64_t  x)
inlinestatic

Definition at line 86 of file Byteswap.h.