#include <stdint.h>
#include <limits.h>
Go to the source code of this file.
|
static void | set_bit (uint64_t *bits, uint64_t index) |
| set the index position bit in the array(uint64_t) More...
|
|
static int | get_bit (uint64_t *bits, uint64_t index) |
| get the value at the index position bit in the array(uint64_t) More...
|
|
static void | reset_bit (uint64_t *bits, uint64_t index) |
| reset the index position bit in the array(uint64_t) More...
|
|
static uint64_t | find_first_zero_bit (uint64_t *bits, uint64_t size, uint64_t idx) |
| find first zero bit in the array(uint64_t) More...
|
|
static uint64_t | find_first_one_bit (uint64_t *bits, uint64_t size, uint64_t idx) |
| find first one bit in the array(uint64_t) More...
|
|
◆ BITS_NOT_FOUND
#define BITS_NOT_FOUND ((uint64_t)UINT64_MAX) |
◆ BITS_PER_BYTE
#define BITS_PER_BYTE (8) |
◆ BITS_PER_UINT64
◆ BITS_TO_UINT64
◆ BITS_TO_UINT64_ALIGN
#define BITS_TO_UINT64_ALIGN |
( |
|
x | ) |
(((uint64_t)x / BITS_PER_UINT64 + 1) * sizeof(uint64_t)) |
◆ find_first_one_bit()
static uint64_t find_first_one_bit |
( |
uint64_t * |
bits, |
|
|
uint64_t |
size, |
|
|
uint64_t |
idx |
|
) |
| |
|
static |
find first one bit in the array(uint64_t)
- Parameters
-
bits | array which contains the bitmap |
size | bitmap's size (the number of bits NOT bytes) |
idx | start position bit |
- Returns
- first one bit position
◆ find_first_zero_bit()
static uint64_t find_first_zero_bit |
( |
uint64_t * |
bits, |
|
|
uint64_t |
size, |
|
|
uint64_t |
idx |
|
) |
| |
|
static |
find first zero bit in the array(uint64_t)
- Parameters
-
bits | array which contains the bitmap |
size | bitmap's size (the number of bits NOT bytes) |
idx | start position bit |
- Returns
- first zero bit position
◆ get_bit()
static int get_bit |
( |
uint64_t * |
bits, |
|
|
uint64_t |
index |
|
) |
| |
|
static |
get the value at the index position bit in the array(uint64_t)
- Parameters
-
bits | array which contains the bitmap |
index | get position (bit position NOT byte or uint64_t position) |
- Returns
- bit status at the index position
◆ reset_bit()
static void reset_bit |
( |
uint64_t * |
bits, |
|
|
uint64_t |
index |
|
) |
| |
|
static |
reset the index position bit in the array(uint64_t)
- Parameters
-
bits | array which contains the bitmap |
index | reset position (bit position NOT byte or uint64_t position) |
◆ set_bit()
static void set_bit |
( |
uint64_t * |
bits, |
|
|
uint64_t |
index |
|
) |
| |
|
static |
set the index position bit in the array(uint64_t)
- Parameters
-
bits | array which contains the bitmap |
index | set position (bit position NOT byte or uint64_t position) |