SphinxBase
5prealpha
|
An implementation bit array - memory efficient storage for digit int and float data. More...
Go to the source code of this file.
Data Structures | |
struct | bitarr_mask_s |
Structure that specifies bits required to efficiently store certain data. More... | |
struct | bitarr_address_s |
Structure that stores address of certain value in bit array. More... | |
Typedefs | |
typedef struct bitarr_mask_s | bitarr_mask_t |
Structure that specifies bits required to efficiently store certain data. | |
typedef struct bitarr_address_s | bitarr_address_t |
Structure that stores address of certain value in bit array. | |
Functions | |
SPHINXBASE_EXPORT uint64 | bitarr_read_int57 (bitarr_address_t address, uint8 length, uint64 mask) |
Read uint64 value from bit array. More... | |
SPHINXBASE_EXPORT void | bitarr_write_int57 (bitarr_address_t address, uint8 length, uint64 value) |
Write specified value into bit array. More... | |
SPHINXBASE_EXPORT uint32 | bitarr_read_int25 (bitarr_address_t address, uint8 length, uint32 mask) |
Read uint32 value from bit array. More... | |
SPHINXBASE_EXPORT void | bitarr_write_int25 (bitarr_address_t address, uint8 length, uint32 value) |
Write specified value into bit array. More... | |
SPHINXBASE_EXPORT void | bitarr_mask_from_max (bitarr_mask_t *bit_mask, uint32 max_value) |
Fills mask for certain int range according to provided max value. More... | |
SPHINXBASE_EXPORT uint8 | bitarr_required_bits (uint32 max_value) |
Computes amount of bits required ti store integers upto value provided. More... | |
An implementation bit array - memory efficient storage for digit int and float data.
Implementation of basic operations of read/write digits consuming as little space as possible.
Definition in file bitarr.h.
SPHINXBASE_EXPORT void bitarr_mask_from_max | ( | bitarr_mask_t * | bit_mask, |
uint32 | max_value | ||
) |
Fills mask for certain int range according to provided max value.
bit_mask | mask that is filled |
max_value | bigest integer that is going to be stored using this mask |
Definition at line 125 of file bitarr.c.
References bitarr_required_bits().
SPHINXBASE_EXPORT uint32 bitarr_read_int25 | ( | bitarr_address_t | address, |
uint8 | length, | ||
uint32 | mask | ||
) |
SPHINXBASE_EXPORT uint64 bitarr_read_int57 | ( | bitarr_address_t | address, |
uint8 | length, | ||
uint64 | mask | ||
) |
SPHINXBASE_EXPORT uint8 bitarr_required_bits | ( | uint32 | max_value | ) |
Computes amount of bits required ti store integers upto value provided.
max_value | bigest integer that going to be stored using this amount of bits |
Definition at line 131 of file bitarr.c.
Referenced by bitarr_mask_from_max().
SPHINXBASE_EXPORT void bitarr_write_int25 | ( | bitarr_address_t | address, |
uint8 | length, | ||
uint32 | value | ||
) |
SPHINXBASE_EXPORT void bitarr_write_int57 | ( | bitarr_address_t | address, |
uint8 | length, | ||
uint64 | value | ||
) |