Collaboration diagram for BIT functions:
![]() |
Data Structures | |
struct | bm::bit_count_table< T > |
Structure to aid in counting bits table contains count of bits in 0-255 diapason of numbers. More... | |
struct | bm::block_set_table< T > |
Structure keeps all-left/right ON bits masks. More... | |
struct | bm::first_bit_table< T > |
Structure keeps index of first ON bit for every byte. More... | |
struct | bm::all_set< T > |
Structure carries pointer on bit block with all bits 1. More... | |
Defines | |
#define | BM_INCWORD_BITCOUNT(cnt, w) |
Functions | |
bm::id_t | bm::word_bitcount64 (bm::id64_t w) |
template<typename T> | |
int | bm::wordcmp0 (T w1, T w2) |
Lexicographical comparison of two words as bit strings. Auxiliary implementation for testing and reference purposes. | |
template<typename T> | |
int | bm::wordcmp (T a, T b) |
Lexicographical comparison of two words as bit strings. Auxiliary implementation for testing and reference purposes. | |
void | bm::or_bit_block (unsigned *dest, unsigned bitpos, unsigned bitcount) |
Sets bits to 1 in the bitblock. | |
void | bm::sub_bit_block (unsigned *dest, unsigned bitpos, unsigned bitcount) |
SUB (AND NOT) bit interval to 1 in the bitblock. | |
void | bm::xor_bit_block (unsigned *dest, unsigned bitpos, unsigned bitcount) |
XOR bit interval to 1 in the bitblock. | |
template<typename T> | |
bm::id_t | bm::gap_bitset_and_count (const unsigned *block, const T *buf) |
Compute bitcount of bit block AND masked by GAP block. | |
template<typename T> | |
bm::id_t | bm::gap_bitset_sub_count (const unsigned *block, const T *buf) |
Compute bitcount of bit block SUB masked by GAP block. | |
template<typename T> | |
bm::id_t | bm::gap_bitset_xor_count (const unsigned *block, const T *buf) |
Compute bitcount of bit block XOR masked by GAP block. | |
template<typename T> | |
bm::id_t | bm::gap_bitset_or_count (const unsigned *block, const T *buf) |
Compute bitcount of bit block OR masked by GAP block. | |
void | bm::bit_block_set (bm::word_t *BMRESTRICT dst, bm::word_t value) |
Bitblock memset operation. | |
template<typename T> | |
int | bm::bitcmp (const T *buf1, const T *buf2, unsigned len) |
Lexicographical comparison of BIT buffers. | |
template<typename T> | |
T | bm::bit_convert_to_arr (T *BMRESTRICT dest, const unsigned *BMRESTRICT src, bm::id_t bits, unsigned dest_len) |
Convert bit block into an array of ints corresponding to 1 bits. | |
bm::id_t | bm::bit_block_calc_count (const bm::word_t *block, const bm::word_t *block_end) |
Bitcount for bit string. | |
bm::id_t | bm::bit_count_change (bm::word_t w) |
bm::id_t | bm::bit_block_calc_count_change (const bm::word_t *block, const bm::word_t *block_end) |
bm::id_t | bm::bit_block_calc_count_range (const bm::word_t *block, bm::word_t left, bm::word_t right) |
template<typename T> | |
void | bm::bit_invert (T *start, T *end) |
bool | bm::is_bits_one (const bm::wordop_t *start, const bm::wordop_t *end) |
Returns "true" if all bits in the block are 1. | |
bool | bm::bit_is_all_zero (const bm::wordop_t *start, const bm::wordop_t *end) |
Returns "true" if all bits in the block are 0. | |
void | bm::bit_block_copy (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
Bitblock copy operation. | |
void | bm::bit_block_and (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
Plain bitblock AND operation. Function does not analyse availability of source and destination blocks. | |
unsigned | bm::bit_block_and_count (const bm::word_t *src1, const bm::word_t *src1_end, const bm::word_t *src2) |
Function ANDs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks. | |
unsigned | bm::bit_block_xor_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
Function XORs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks. | |
unsigned | bm::bit_block_sub_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
Function SUBs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks. | |
unsigned | bm::bit_block_or_count (const bm::word_t *src1, const bm::word_t *src1_end, const bm::word_t *src2) |
Function ORs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks. | |
bm::word_t * | bm::bit_operation_and (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
bitblock AND operation. | |
bm::id_t | bm::bit_operation_and_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
Performs bitblock AND operation and calculates bitcount of the result. | |
bm::id_t | bm::bit_operation_sub_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
Performs bitblock SUB operation and calculates bitcount of the result. | |
bm::id_t | bm::bit_operation_or_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
Performs bitblock OR operation and calculates bitcount of the result. | |
void | bm::bit_block_or (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
Plain bitblock OR operation. Function does not analyse availability of source and destination blocks. | |
bm::word_t * | bm::bit_operation_or (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
Block OR operation. Makes analysis if block is 0 or FULL. | |
void | bm::bit_block_sub (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
Plain bitblock SUB (AND NOT) operation. Function does not analyse availability of source and destination blocks. | |
bm::word_t * | bm::bit_operation_sub (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
bitblock SUB operation. | |
void | bm::bit_block_xor (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
Plain bitblock XOR operation. Function does not analyse availability of source and destination blocks. | |
bm::word_t * | bm::bit_operation_xor (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
bitblock XOR operation. | |
bm::id_t | bm::bit_operation_xor_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
Performs bitblock XOR operation and calculates bitcount of the result. | |
void | bm::bit_find_head_tail (const bm::word_t *data, unsigned *head_idx, unsigned *tail_idx) |
Inspects bit block for zero words at the head and at the end. | |
int | bm::bit_find_in_block (const bm::word_t *data, unsigned nbit, bm::id_t *prev) |
Searches for the next 1 bit in the BIT block. | |
template<typename T, typename B> | |
unsigned | bm::bit_list (T w, B *bits) |
Unpacks word into list of ON bit indexes. |
|
Value: cnt += \ bm::bit_count_table<true>::_count[(unsigned char)(w)] + \ bm::bit_count_table<true>::_count[(unsigned char)((w) >> 8)] + \ bm::bit_count_table<true>::_count[(unsigned char)((w) >> 16)] + \ bm::bit_count_table<true>::_count[(unsigned char)((w) >> 24)]; Definition at line 167 of file bmfunc.h. Referenced by bm::bit_block_and_count(), bm::bit_block_calc_count(), bm::bit_block_calc_count_change(), bm::bit_block_calc_count_range(), bm::bit_block_or_count(), bm::bit_block_sub_count(), bm::bit_block_xor_count(), and bm::bit_count_change(). |
|
Plain bitblock AND operation. Function does not analyse availability of source and destination blocks.
Definition at line 2488 of file bmfunc.h. References BMRESTRICT, and VECT_AND_ARR. Referenced by bm::bit_operation_and(). |
|
Function ANDs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks.
Definition at line 2522 of file bmfunc.h. References BM_INCWORD_BITCOUNT, and VECT_BITCOUNT_AND. Referenced by bm::bit_operation_and_count(). |
|
Bitcount for bit string. Function calculates number of 1 bits in the given array of words. Make sure the addresses are aligned. Definition at line 2021 of file bmfunc.h. References BM_ASSERT, BM_INCWORD_BITCOUNT, and bm::word_bitcount64(). Referenced by bm::bit_operation_or_count(), bm::bit_operation_sub_count(), bm::bit_operation_xor_count(), bm::combine_count_operation_with_block(), and bm::bvector< Alloc, MS >::stat(). |
|
Function calculates number of times when bit value changed (1-0 or 0-1) in the bit block. Definition at line 2113 of file bmfunc.h. References BM_ASSERT, BM_INCWORD_BITCOUNT, and bm::word_bitcount64(). |
|
Function calculates number of 1 bits in the given array of words in the range between left anf right bits (borders included) Make sure the addresses are aligned. Definition at line 2201 of file bmfunc.h. References BM_ASSERT, and BM_INCWORD_BITCOUNT. Referenced by bm::bvector< Alloc, MS >::count_range(), bm::gap_bitset_and_count(), bm::gap_bitset_or_count(), bm::gap_bitset_sub_count(), and bm::gap_bitset_xor_count(). |
|
Bitblock copy operation.
Definition at line 2468 of file bmfunc.h. References VECT_COPY_BLOCK. |
|
Plain bitblock OR operation. Function does not analyse availability of source and destination blocks.
Definition at line 2811 of file bmfunc.h. References BMRESTRICT, and VECT_OR_ARR. Referenced by bm::bit_operation_or(). |
|
Function ORs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks.
Definition at line 2627 of file bmfunc.h. References BM_INCWORD_BITCOUNT, and VECT_BITCOUNT_OR. Referenced by bm::bit_operation_or_count(). |
|
Bitblock memset operation.
Definition at line 1438 of file bmfunc.h. Referenced by bm::gap_convert_to_bitset(). |
|
Plain bitblock SUB (AND NOT) operation. Function does not analyse availability of source and destination blocks.
Definition at line 2907 of file bmfunc.h. References BMRESTRICT, and VECT_SUB_ARR. Referenced by bm::bit_operation_sub(). |
|
Function SUBs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks.
Definition at line 2592 of file bmfunc.h. References BM_INCWORD_BITCOUNT, and VECT_BITCOUNT_SUB. Referenced by bm::bit_operation_sub_count(). |
|
Plain bitblock XOR operation. Function does not analyse availability of source and destination blocks.
Definition at line 3003 of file bmfunc.h. References BMRESTRICT, and VECT_XOR_ARR. Referenced by bm::bit_operation_xor(). |
|
Function XORs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks.
Definition at line 2557 of file bmfunc.h. References BM_INCWORD_BITCOUNT, and VECT_BITCOUNT_XOR. Referenced by bm::bit_operation_xor_count(). |
|
Convert bit block into an array of ints corresponding to 1 bits.
Definition at line 1956 of file bmfunc.h. References BMRESTRICT. |
|
Function calculates number of times when bit value changed (1-0 or 0-1). For 001 result is 2 010 - 3 011 - 2 111 - 1 Definition at line 2095 of file bmfunc.h. References BM_INCWORD_BITCOUNT. |
|
Inspects bit block for zero words at the head and at the end. If there are no head-tail zeroes output parameters head_idx and tail_idx are going to be [0, bm::set_block_size-1]. If block is all-zero head_idx is -1
Definition at line 3109 of file bmfunc.h. References BM_ASSERT. |
|
Searches for the next 1 bit in the BIT block.
|
|
Function inverts block of bits Definition at line 2267 of file bmfunc.h. References VECT_INVERT_ARR. |
|
Returns "true" if all bits in the block are 0.
Definition at line 2309 of file bmfunc.h. Referenced by bm::bvector< Alloc, MS >::compare(). |
|
Unpacks word into list of ON bit indexes.
Definition at line 3193 of file bmfunc.h. Referenced by bm::bvector< Alloc, MS >::enumerator::go_up(). |
|
bitblock AND operation.
Definition at line 2663 of file bmfunc.h. References bm::bit_block_and(), BM_ASSERT, IS_EMPTY_BLOCK, IS_FULL_BLOCK, and IS_VALID_ADDR. |
|
Performs bitblock AND operation and calculates bitcount of the result.
Definition at line 2728 of file bmfunc.h. References bm::bit_block_and_count(), and IS_EMPTY_BLOCK. Referenced by bm::combine_count_operation_with_block(). |
|
Block OR operation. Makes analysis if block is 0 or FULL.
Definition at line 2849 of file bmfunc.h. References bm::bit_block_or(), BM_ASSERT, FULL_BLOCK_ADDR, IS_FULL_BLOCK, and IS_VALID_ADDR. |
|
Performs bitblock OR operation and calculates bitcount of the result.
Definition at line 2781 of file bmfunc.h. References bm::bit_block_calc_count(), bm::bit_block_or_count(), and IS_EMPTY_BLOCK. Referenced by bm::combine_count_operation_with_block(). |
|
bitblock SUB operation.
Definition at line 2947 of file bmfunc.h. References bm::bit_block_sub(), BM_ASSERT, IS_FULL_BLOCK, and IS_VALID_ADDR. |
|
Performs bitblock SUB operation and calculates bitcount of the result.
Definition at line 2752 of file bmfunc.h. References bm::bit_block_calc_count(), bm::bit_block_sub_count(), and IS_EMPTY_BLOCK. Referenced by bm::combine_count_operation_with_block(). |
|
bitblock XOR operation.
Definition at line 3043 of file bmfunc.h. References bm::bit_block_xor(), BM_ASSERT, and IS_VALID_ADDR. |
|
Performs bitblock XOR operation and calculates bitcount of the result.
Definition at line 3081 of file bmfunc.h. References bm::bit_block_calc_count(), bm::bit_block_xor_count(), and IS_EMPTY_BLOCK. Referenced by bm::combine_count_operation_with_block(). |
|
Lexicographical comparison of BIT buffers.
Definition at line 1786 of file bmfunc.h. References BM_ASSERT. Referenced by bm::bvector< Alloc, MS >::compare(). |
|
Compute bitcount of bit block AND masked by GAP block.
Definition at line 1280 of file bmfunc.h. References bm::bit_block_calc_count_range(), and BM_ASSERT. Referenced by bm::combine_count_operation_with_block(). |
|
Compute bitcount of bit block OR masked by GAP block.
Definition at line 1390 of file bmfunc.h. References bm::bit_block_calc_count_range(), and BM_ASSERT. Referenced by bm::combine_count_operation_with_block(). |
|
Compute bitcount of bit block SUB masked by GAP block.
Definition at line 1316 of file bmfunc.h. References bm::bit_block_calc_count_range(), and BM_ASSERT. Referenced by bm::combine_count_operation_with_block(). |
|
Compute bitcount of bit block XOR masked by GAP block.
Definition at line 1350 of file bmfunc.h. References bm::bit_block_calc_count_range(), and BM_ASSERT. Referenced by bm::combine_count_operation_with_block(). |
|
Returns "true" if all bits in the block are 1.
|
|
Sets bits to 1 in the bitblock.
Definition at line 965 of file bmfunc.h. Referenced by bm::gap_add_to_bitset(). |
|
SUB (AND NOT) bit interval to 1 in the bitblock.
Definition at line 1027 of file bmfunc.h. Referenced by bm::gap_and_to_bitset(), and bm::gap_sub_to_bitset(). |
|
Function calculates number of 1 bits in 64-bit word. Definition at line 178 of file bmfunc.h. Referenced by bm::bit_block_calc_count(), and bm::bit_block_calc_count_change(). |
|
Lexicographical comparison of two words as bit strings. Auxiliary implementation for testing and reference purposes.
|
|
Lexicographical comparison of two words as bit strings. Auxiliary implementation for testing and reference purposes.
|
|
XOR bit interval to 1 in the bitblock.
Definition at line 1089 of file bmfunc.h. Referenced by bm::gap_xor_to_bitset(). |