#include "eg_config.h"#include "eg_macros.h"#include "eg_mem.h"

Go to the source code of this file.
Defines | |
| #define | __EGBIT_DEBUG_LEVEL__ 10 |
| #define | bit_int_t uint32_t |
| #define | EGbitset_t bit_int_t |
| #define | EGbitsetSize(__Bsize) (((__Bsize)>>__EGBIT_SHIFT__)+(((__Bsize)&__EGBIT_MASK__)?1:0)) |
| Macro to compute the right size of a bitset given the desired number of bits in the bitset. | |
Word lengths and related macros | |
| #define | __EGBIT_WORD_SIZE__ 32U |
| #define | __EGBIT_SHIFT__ 5U |
| #define | __EGBIT_MASK__ 31U |
Functions | |
| int | EGbitAnd (bit_int_t *dst, const bit_int_t *src, const unsigned int from, const unsigned int to) |
| int | EGbitCopy (bit_int_t *const a, const bit_int_t *const b, const unsigned int from, const unsigned int to) |
| EGbitset_t | EGbitCount (bit_int_t *bitset, const unsigned int from, const unsigned int to) |
| Count the number of on-bits in a bit-map. | |
| EGbitset_t | EGbitElemBitCount (EGbitset_t n) |
| Count number of on bits on 32-bit integers. | |
| int | EGbitIsEqual (const bit_int_t *a, const bit_int_t *b, const unsigned int from, const unsigned int to) |
| int | EGbitIsLeq (const bit_int_t *a, const bit_int_t *b, const unsigned int from, const unsigned int to) |
| int | EGbitLeftShift (bit_int_t *dst, const bit_int_t *src, const unsigned int shift, const unsigned int from, const unsigned int to) |
| unsigned int | EGbitNext (const bit_int_t *dst, const unsigned int pos, const unsigned int size) |
| int | EGbitOr (bit_int_t *dst, const bit_int_t *src, const unsigned int from, const unsigned int to) |
| int | EGbitPlus (bit_int_t *dst, const bit_int_t *src, const unsigned int from, const unsigned int to) |
| unsigned int | EGbitPrev (const EGbitset_t *dst, const unsigned int pos) |
| int | EGbitReset (bit_int_t *dst, const unsigned int from, const unsigned int to) |
| int | EGbitRightShift (bit_int_t *dst, const bit_int_t *src, const unsigned int shift, const unsigned int from, const unsigned int to) |
| int | EGbitSanity (void) |
| int | EGbitSet (bit_int_t *const dst, const unsigned int pos) |
| int | EGbitTest (bit_int_t const *const dst, const unsigned int pos) |
| int | EGbitUnset (bit_int_t *dst, const unsigned int pos) |
| int | EGbitXor (bit_int_t *dst, const bit_int_t *src, const unsigned int from, const unsigned int to) |
| #define __EGBIT_DEBUG_LEVEL__ 10 |
Definition at line 60 of file eg_bit.h.
Referenced by EGbitSet(), EGbitTest(), and EGbitUnset().
| #define __EGBIT_MASK__ 31U |
Definition at line 68 of file eg_bit.h.
Referenced by EGbitNext(), EGbitPrev(), EGbitSanity(), EGbitSet(), EGbitTest(), and EGbitUnset().
| #define __EGBIT_SHIFT__ 5U |
Definition at line 67 of file eg_bit.h.
Referenced by EGbitCopy(), EGbitSanity(), EGbitSet(), EGbitTest(), and EGbitUnset().
| #define __EGBIT_WORD_SIZE__ 32U |
Definition at line 66 of file eg_bit.h.
Referenced by EGbitLeftShift(), EGbitPlus(), EGbitRightShift(), and EGbitSanity().
| #define EGbitset_t bit_int_t |
Definition at line 88 of file eg_bit.h.
Referenced by EGbitCopy(), EGbitCount(), EGbitLeftShift(), EGbitNext(), EGbitPlus(), EGbitPrev(), EGbitReset(), EGbitRightShift(), and EGbitSanity().
| #define EGbitsetSize | ( | __Bsize | ) | (((__Bsize)>>__EGBIT_SHIFT__)+(((__Bsize)&__EGBIT_MASK__)?1:0)) |
| int EGbitAnd | ( | bit_int_t * | dst, | |
| const bit_int_t * | src, | |||
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
| int EGbitCopy | ( | bit_int_t *const | a, | |
| const bit_int_t *const | b, | |||
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
| EGbitset_t EGbitCount | ( | bit_int_t * | bitset, | |
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
Count the number of on-bits in a bit-map.
| EGbitset_t EGbitElemBitCount | ( | EGbitset_t | n | ) |
Count number of on bits on 32-bit integers.
Definition at line 550 of file eg_bit.c.
References EGBIT_COUNT.
Referenced by EGbitCount().
| int EGbitIsEqual | ( | const bit_int_t * | a, | |
| const bit_int_t * | b, | |||
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
| int EGbitIsLeq | ( | const bit_int_t * | a, | |
| const bit_int_t * | b, | |||
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
| int EGbitLeftShift | ( | bit_int_t * | dst, | |
| const bit_int_t * | src, | |||
| const unsigned int | shift, | |||
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
| unsigned int EGbitNext | ( | const bit_int_t * | dst, | |
| const unsigned int | pos, | |||
| const unsigned int | size | |||
| ) |
| int EGbitOr | ( | bit_int_t * | dst, | |
| const bit_int_t * | src, | |||
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
| int EGbitPlus | ( | bit_int_t * | dst, | |
| const bit_int_t * | src, | |||
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
| unsigned int EGbitPrev | ( | const EGbitset_t * | dst, | |
| const unsigned int | pos | |||
| ) |
Definition at line 279 of file eg_bit.c.
References __EGBIT_MASK__, EGbitset_t, and EXIT.
| int EGbitReset | ( | bit_int_t * | dst, | |
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
| int EGbitRightShift | ( | bit_int_t * | dst, | |
| const bit_int_t * | src, | |||
| const unsigned int | shift, | |||
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
| int EGbitSanity | ( | void | ) |
Definition at line 376 of file eg_bit.c.
References __EGBIT_MASK__, __EGBIT_SHIFT__, __EGBIT_WORD_SIZE__, EGbitAnd(), EGbitNext(), EGbitOr(), EGbitReset(), EGbitSet(), EGbitset_t, and EGbitXor().

| int EGbitSet | ( | bit_int_t *const | dst, | |
| const unsigned int | pos | |||
| ) |
| int EGbitTest | ( | bit_int_t const *const | dst, | |
| const unsigned int | pos | |||
| ) |
| int EGbitUnset | ( | bit_int_t * | dst, | |
| const unsigned int | pos | |||
| ) |
| int EGbitXor | ( | bit_int_t * | dst, | |
| const bit_int_t * | src, | |||
| const unsigned int | from, | |||
| const unsigned int | to | |||
| ) |
1.7.1