|
|
#define | BITMAP(_name, _size) bitmap_block_t _name[BITMAP_OFFSET(NON_ZERO(_size) - 1) + 1] |
| | Declare a bitmap variable of a given size.
|
| |
|
| typedef native_t | bitmap_block_t |
| | Basic unit used by the bitmap. More...
|
| |
|
typedef bitmap_block_t * | bitmap_t |
| | A bitmap instance A bitmap is just a simple list of bytes (bitmap_block_t)
|
| |
|
| static ALWAYS_INLINE bool | bitmap_read (const bitmap_t bitmap, uint32_t index) |
| | Read the value at a given index inside a bitmap. More...
|
| |
| static ALWAYS_INLINE void | bitmap_set (bitmap_t bitmap, uint32_t index) |
| | Set a value at a given index inside a bitmap as present. More...
|
| |
| static ALWAYS_INLINE void | bitmap_clear (bitmap_t bitmap, uint32_t index) |
| | Set a value at a given index inside a bitmap as absent. More...
|
| |
| static ALWAYS_INLINE void | bitmap_assign (bitmap_t bitmap, uint32_t index, bool value) |
| | Set a value at a given index inside a bitmap to the given value. More...
|
| |
Bitmap
A bitmap is a simple array of bytes, in which each and every bit corresponds to an item and can be set to 'present' or not. This is useful to easily keep track of the state of a large number of elements.
◆ bitmap_block_t
A block is just a group of bits
◆ bitmap_assign()
| static ALWAYS_INLINE void bitmap_assign |
( |
bitmap_t |
bitmap, |
|
|
uint32_t |
index, |
|
|
bool |
value |
|
) |
| |
|
static |
- Warning
- This function does not perform any bound checking
◆ bitmap_clear()
| static ALWAYS_INLINE void bitmap_clear |
( |
bitmap_t |
bitmap, |
|
|
uint32_t |
index |
|
) |
| |
|
static |
- Warning
- This function does not perform any bound checking
◆ bitmap_read()
| static ALWAYS_INLINE bool bitmap_read |
( |
const bitmap_t |
bitmap, |
|
|
uint32_t |
index |
|
) |
| |
|
static |
- Warning
- This function does not perform any bound checking
- Returns
- Whether state of the nth element in a bitmap
◆ bitmap_set()
| static ALWAYS_INLINE void bitmap_set |
( |
bitmap_t |
bitmap, |
|
|
uint32_t |
index |
|
) |
| |
|
static |
- Warning
- This function does not perform any bound checking