![]() |
Multi-ApplicationOnlineProfiling
2.1
|
This is a bit array data structure implementation. More...
Data Structures | |
| struct | Bit_Array |
| Defines a bit array. More... | |
Functions | |
| static uint64_t | Bit_Array_size (struct Bit_Array *ba) |
| Getter on the array size. More... | |
| void | Bit_Array_init (struct Bit_Array *ba, uint64_t size) |
| Bit_Array initializer. More... | |
| void | Bit_Array_release (struct Bit_Array *ba) |
| Bit_Array deinitializer. More... | |
| void | Bit_Array_replicate (struct Bit_Array *dest, struct Bit_Array *src) |
| Copies a Bit_Array into another. More... | |
| void | Bit_Array_dump (struct Bit_Array *ba) |
| Prints a Bit_Array on standard output. More... | |
| static void | Bit_Array_set (struct Bit_Array *ba, uint64_t key, uint8_t value) |
| Sets a bit in a Bit_Array. More... | |
| static uint8_t | Bit_Array_get (struct Bit_Array *ba, uint64_t key) |
| Gets a bit in a Bit_Array. More... | |
Variables | |
| static const int | get_set_bit_mask [] |
| Masks used to get and set bits. More... | |
| static const int | unset_bit_mask [] |
| Masks used to unset bits. More... | |
This is a bit array data structure implementation.
| void Bit_Array_dump | ( | struct Bit_Array * | ba | ) |
Prints a Bit_Array on standard output.
| ba | the Bit_Array to print |
Definition at line 68 of file Bit_Array.c.

|
inlinestatic |
Gets a bit in a Bit_Array.
| ba | the Bit_Array where to get the bit |
| key | the index of the bit to get |
Definition at line 167 of file Bit_Array.h.

| void Bit_Array_init | ( | struct Bit_Array * | ba, |
| uint64_t | size | ||
| ) |
Bit_Array initializer.
| ba | the Bit_Array to initialize |
| size | the number of bits wanted fot ba |
Definition at line 23 of file Bit_Array.c.

| void Bit_Array_release | ( | struct Bit_Array * | ba | ) |
Bit_Array deinitializer.
| ba | the Bit_Array to deinitialize |
Definition at line 41 of file Bit_Array.c.

Copies a Bit_Array into another.
Definition at line 55 of file Bit_Array.c.

|
inlinestatic |
Sets a bit in a Bit_Array.
| ba | the Bit_Array where to set the bit |
| key | the index of the bit to set |
| value | the value to set |
Definition at line 140 of file Bit_Array.h.

|
inlinestatic |
Getter on the array size.
| ba | the array |
Definition at line 101 of file Bit_Array.h.
|
static |
Masks used to get and set bits.
It is binary anded/ored with the buffer to get/set the bit value :
Example in 4 bits : 0001 0010 0100 1000
Definition at line 51 of file Bit_Array.h.
|
static |
Masks used to unset bits.
It is binary anded to unset bit on the buffer :
Example in 4 bits : 1110 1101 1011 0111
Definition at line 76 of file Bit_Array.h.