FD.io VPP  v18.11-rc0-18-g2a3fb1a
Vector Packet Processing
bitops.h File Reference
+ Include dependency graph for bitops.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  compress_main_t
 

Macros

#define foreach_set_bit(var, mask, body)
 

Functions

static uword count_set_bits (uword x)
 
static void compress_init (compress_main_t *cm, uword mask)
 
static uword compress_bits (compress_main_t *cm, uword x)
 
static uword rotate_left (uword x, uword i)
 
static uword rotate_right (uword x, uword i)
 
static uword next_with_same_number_of_set_bits (uword x)
 

Macro Definition Documentation

#define foreach_set_bit (   var,
  mask,
  body 
)
Value:
do { \
uword _foreach_set_bit_m_##var = (mask); \
uword _foreach_set_bit_f_##var; \
while (_foreach_set_bit_m_##var != 0) \
{ \
_foreach_set_bit_f_##var = first_set (_foreach_set_bit_m_##var); \
_foreach_set_bit_m_##var ^= _foreach_set_bit_f_##var; \
(var) = min_log2 (_foreach_set_bit_f_##var); \
do { body; } while (0); \
} \
} while (0)
static uword min_log2(uword x)
Definition: clib.h:138
static uword first_set(uword x)
Definition: clib.h:247
u64 uword
Definition: types.h:112

Definition at line 166 of file bitops.h.

Function Documentation

static uword compress_bits ( compress_main_t cm,
uword  x 
)
inlinestatic

Definition at line 118 of file bitops.h.

static void compress_init ( compress_main_t cm,
uword  mask 
)
inlinestatic

Definition at line 91 of file bitops.h.

static uword count_set_bits ( uword  x)
inlinestatic

Definition at line 45 of file bitops.h.

+ Here is the caller graph for this function:

static uword next_with_same_number_of_set_bits ( uword  x)
inlinestatic

Definition at line 156 of file bitops.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword rotate_left ( uword  x,
uword  i 
)
inlinestatic

Definition at line 142 of file bitops.h.

+ Here is the caller graph for this function:

static uword rotate_right ( uword  x,
uword  i 
)
inlinestatic

Definition at line 148 of file bitops.h.