dlvhex  2.5.0
vs10/bm/bmfunc.h File Reference
#include <memory.h>
#include "bmdef.h"
#include "bmutil.h"
Include dependency graph for bmfunc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bm::bv_statistics
 Structure with statistical information about bitset's memory allocation details. More...
struct  bm::gap_len_table< T >
 Default GAP lengths table. More...
struct  bm::gap_len_table_min< T >
 Alternative GAP lengths table. Good for for memory saver mode and very sparse bitsets. More...
struct  bm::block_set_table< T >
 Structure keeps all-left/right ON bits masks. More...
struct  bm::all_set< T >
 Structure carries pointer on bit block with all bits 1. More...
struct  bm::all_set< T >::all_set_block
struct  bm::_copyright< T >
 Internal structure. More...
struct  bm::globals< T >
 Internal structure. More...
struct  bm::globals< T >::bo
struct  bm::d_copy_func< T >
 d-Gap copy functor More...
class  bm::copy_to_array_functor< B >
 Adaptor to copy 1 bits to array. More...
class  bm::copy_to_array_functor_inc< B >
 Adaptor to copy 1 bits to array with base increment. More...
class  bm::bitblock_get_adapter
 Bit-block get adapter, takes bitblock and represents it as a get_32() accessor function /internal. More...
class  bm::bitblock_store_adapter
 Bit-block store adapter, takes bitblock and saves results into it /internal. More...
class  bm::bitblock_sum_adapter
 Bit-block sum adapter, takes values and sums it /internal. More...
class  bm::decoder_range_adapter< DEC >
 Adapter to get words from a range stream (see range serialized bit-block) More...
struct  bm::bit_AND< W >
 Bit AND functor. More...
struct  bm::bit_OR< W >
 Bit OR functor. More...
struct  bm::bit_SUB< W >
 Bit SUB functor. More...
struct  bm::bit_XOR< W >
 Bit XOR functor. More...
struct  bm::bit_ASSIGN< W >
 Bit ASSIGN functor. More...
struct  bm::bit_COUNT< W >
 Bit COUNT functor. More...
struct  bm::bit_COUNT_AND< W >
 Bit COUNT AND functor. More...
struct  bm::bit_COUNT_XOR< W >
 Bit COUNT XOR functor. More...
struct  bm::bit_COUNT_OR< W >
 Bit COUNT OR functor. More...
struct  bm::bit_COUNT_SUB_AB< W >
 Bit COUNT SUB AB functor. More...
struct  bm::bit_COUNT_SUB_BA< W >
 Bit SUB BA functor. More...
struct  bm::bit_COUNT_A< W >
 Bit COUNT A functor. More...
struct  bm::bit_COUNT_B< W >
 Bit COUNT B functor. More...
struct  bm::operation_functions< T >

Namespaces

namespace  bm

Typedefs

typedef void(* bm::gap_operation_to_bitset_func_type )(unsigned *, const gap_word_t *)
typedef gap_word_t *(* bm::gap_operation_func_type )(const gap_word_t *BMRESTRICT, const gap_word_t *BMRESTRICT, gap_word_t *BMRESTRICT, unsigned &)
typedef bm::id_t(* bm::bit_operation_count_func_type )(const bm::word_t *BMRESTRICT, const bm::word_t *BMRESTRICT, const bm::word_t *BMRESTRICT)

Enumerations

enum  bm::set_operation {
  bm::set_AND = 0, bm::set_OR = 1, bm::set_SUB = 2, bm::set_XOR = 3,
  bm::set_ASSIGN = 4, bm::set_COUNT = 5, bm::set_COUNT_AND = 6, bm::set_COUNT_XOR = 7,
  bm::set_COUNT_OR = 8, bm::set_COUNT_SUB_AB = 9, bm::set_COUNT_SUB_BA = 10, bm::set_COUNT_A = 11,
  bm::set_COUNT_B = 12, bm::set_END, bm::set_AND = 0, bm::set_OR = 1,
  bm::set_SUB = 2, bm::set_XOR = 3, bm::set_ASSIGN = 4, bm::set_COUNT = 5,
  bm::set_COUNT_AND = 6, bm::set_COUNT_XOR = 7, bm::set_COUNT_OR = 8, bm::set_COUNT_SUB_AB = 9,
  bm::set_COUNT_SUB_BA = 10, bm::set_COUNT_A = 11, bm::set_COUNT_B = 12, bm::set_END
}
 Nomenclature of set operations. More...
enum  bm::operation {
  bm::BM_AND = set_AND, bm::BM_OR = set_OR, bm::BM_SUB = set_SUB, bm::BM_XOR = set_XOR,
  bm::BM_AND = set_AND, bm::BM_OR = set_OR, bm::BM_SUB = set_SUB, bm::BM_XOR = set_XOR
}
 Bit operations enumeration. More...
enum  bm::ByteOrder { bm::BigEndian = 0, bm::LittleEndian = 1, bm::BigEndian = 0, bm::LittleEndian = 1 }
 Byte orders recognized by the library. More...

Functions

bm::id_t bm::bit_block_any_range (const bm::word_t *block, bm::word_t left, bm::word_t right)
bm::id_t bm::bit_block_calc_count_range (const bm::word_t *block, bm::word_t left, bm::word_t right)
BMFORCEINLINE bm::id_t bm::word_bitcount (bm::id_t w)
int bm::parallel_popcnt_32 (unsigned int n)
bool bm::is_const_set_operation (set_operation op)
 Returns true if set operation is constant (bitcount)
bm::operation bm::setop2op (bm::set_operation op)
 Convert set operation to operation.
template<typename W >
void bm::xor_swap (W &x, W &y)
 XOR swap two scalar variables.
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.
template<typename T >
unsigned bm::gap_bfind (const T *buf, unsigned pos, unsigned *is_set)
template<typename T >
unsigned bm::gap_test (const T *buf, unsigned pos)
 Tests if bit = pos is true.
template<class T , class F >
void bm::for_each_nzblock (T ***root, unsigned size1, F &f)
template<class T , class F >
void bm::for_each_nzblock2 (T ***root, unsigned size1, F &f)
template<class T , class F >
bool bm::for_each_nzblock_if (T ***root, unsigned size1, F &f)
template<class T , class F >
void bm::for_each_block (T ***root, unsigned size1, F &f)
template<class T , class F >
bm::bmfor_each (T first, T last, F f)
template<class T >
bm::sum_arr (T *first, T *last)
template<typename T >
unsigned bm::gap_bit_count (const T *buf, unsigned dsize=0)
 Calculates number of bits ON in GAP buffer.
template<typename T >
unsigned bm::gap_bit_count_range (const T *buf, T left, T right)
 Counts 1 bits in GAP buffer in the closed [left, right] diapason.
template<class T , class Func >
void bm::for_each_dgap (const T *gap_buf, Func &func)
template<typename T >
T * bm::gap_2_dgap (const T *gap_buf, T *dgap_buf, bool copy_head=true)
 Convert GAP buffer into D-GAP buffer.
template<typename T >
void bm::dgap_2_gap (const T *dgap_buf, T *gap_buf, T gap_header=0)
 Convert D-GAP buffer into GAP buffer.
template<typename T >
int bm::gapcmp (const T *buf1, const T *buf2)
 Lexicographical comparison of GAP buffers.
template<typename T , class F >
void bm::gap_buff_op (T *BMRESTRICT dest, const T *BMRESTRICT vect1, unsigned vect1_mask, const T *BMRESTRICT vect2, unsigned vect2_mask, F &f, unsigned &dlen)
 Abstract operation for GAP buffers. Receives functor F as a template argument.
template<typename T , class F >
unsigned bm::gap_buff_any_op (const T *BMRESTRICT vect1, unsigned vect1_mask, const T *BMRESTRICT vect2, unsigned vect2_mask, F f)
 Abstract distance test operation for GAP buffers. Receives functor F as a template argument.
template<typename T , class F >
unsigned bm::gap_buff_count_op (const T *vect1, const T *vect2, F f)
 Abstract distance(similarity) operation for GAP buffers. Receives functor F as a template argument.
template<typename T >
unsigned bm::gap_set_value (unsigned val, T *BMRESTRICT buf, unsigned pos, unsigned *BMRESTRICT is_set)
 Sets or clears bit in the GAP buffer.
template<typename T >
unsigned bm::gap_add_value (T *buf, T pos)
 Add new value to the end of GAP buffer.
template<typename T >
unsigned bm::gap_set_array (T *buf, const T *arr, unsigned len)
 Convert array to GAP buffer.
template<typename T >
unsigned bm::bit_array_compute_gaps (const T *arr, unsigned len)
 Compute number of GAPs in bit-array.
template<typename T >
int bm::gap_find_in_block (const T *buf, unsigned nbit, bm::id_t *prev)
 Searches for the next 1 bit in the GAP block.
BMFORCEINLINE void bm::set_bit (unsigned *dest, unsigned bitpos)
 Set 1 bit in a block.
BMFORCEINLINE unsigned bm::test_bit (const unsigned *block, unsigned bitpos)
 Test 1 bit in a block.
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 >
void bm::gap_sub_to_bitset (unsigned *BMRESTRICT dest, const T *BMRESTRICT buf)
 SUB (AND NOT) GAP block to bitblock.
template<typename T >
void bm::gap_xor_to_bitset (unsigned *BMRESTRICT dest, const T *BMRESTRICT buf)
 XOR GAP block to bitblock.
template<typename T >
void bm::gap_add_to_bitset_l (unsigned *dest, const T *buf, unsigned buf_len)
 Adds(OR) GAP block to bitblock.
template<typename T >
void bm::gap_add_to_bitset (unsigned *dest, const T *buf)
 Adds(OR) GAP block to bitblock.
template<typename T >
void bm::gap_and_to_bitset (unsigned *dest, const T *buf)
 ANDs GAP block to 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_and_any (const unsigned *block, const T *buf)
 Bitcount test 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_sub_any (const unsigned *block, const T *buf)
 Compute bitcount test 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_xor_any (const unsigned *block, const T *buf)
 Compute bitcount test 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.
template<typename T >
bm::id_t bm::gap_bitset_or_any (const unsigned *block, const T *buf)
 Compute bitcount test 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 >
void bm::gap_convert_to_bitset (unsigned *dest, const T *buf)
 GAP block to bitblock conversion.
template<typename T >
void bm::gap_convert_to_bitset_l (unsigned *dest, const T *buf, unsigned buf_len)
 GAP block to bitblock conversion.
template<typename T >
void bm::gap_convert_to_bitset (unsigned *dest, const T *buf, unsigned dest_len)
 GAP block to bitblock conversion.
template<typename T >
unsigned * bm::gap_convert_to_bitset_smart (unsigned *dest, const T *buf, id_t set_max)
 Smart GAP block to bitblock conversion.
template<typename T >
unsigned bm::gap_control_sum (const T *buf)
 Calculates sum of all words in GAP block. (For debugging purposes)
template<class T >
void bm::gap_set_all (T *buf, unsigned set_max, unsigned value)
 Sets all bits to 0 or 1 (GAP)
template<class T >
void bm::gap_init_range_block (T *buf, T from, T to, T value, unsigned set_max)
 Init gap block so it has block in it (can be whole block)
template<typename T >
void bm::gap_invert (T *buf)
 Inverts all bits in the GAP buffer.
template<typename T >
bool bm::gap_is_all_zero (const T *buf, unsigned set_max)
 Temporary inverts all bits in the GAP buffer.
template<typename T >
bool bm::gap_is_all_one (const T *buf, unsigned set_max)
 Checks if GAP block is all-one.
template<typename T >
bm::gap_length (const T *buf)
 Returs GAP block length.
template<typename T >
unsigned bm::gap_capacity (const T *buf, const T *glevel_len)
 Returs GAP block capacity.
template<typename T >
unsigned bm::gap_limit (const T *buf, const T *glevel_len)
 Returs GAP block capacity limit.
template<typename T >
unsigned bm::gap_level (const T *buf)
 Returs GAP blocks capacity level.
template<typename T >
void bm::set_gap_level (T *buf, unsigned level)
 Sets GAP block capacity level.
template<typename T >
int bm::gap_calc_level (int len, const T *glevel_len)
 Calculates GAP block capacity level.
template<typename T >
unsigned bm::gap_free_elements (const T *buf, const T *glevel_len)
 Returns number of free elements in GAP block array. Difference between GAP block capacity on this level and actual GAP length.
template<typename T >
int bm::bitcmp (const T *buf1, const T *buf2, unsigned len)
 Lexicographical comparison of BIT buffers.
template<typename T >
unsigned bm::bit_convert_to_gap (T *BMRESTRICT dest, const unsigned *BMRESTRICT src, bm::id_t bits, unsigned dest_len)
 Converts bit block to GAP.
template<class T , class F >
void bm::for_each_gap_dbit (const T *buf, F &func)
 Iterate gap block as delta-bits with a functor.
template<typename D , typename T >
bm::gap_convert_to_arr (D *BMRESTRICT dest, const T *BMRESTRICT buf, unsigned dest_len, bool invert=false)
 Convert gap block into 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)
void bm::bit_count_change32 (const bm::word_t *block, const bm::word_t *block_end, unsigned *bit_count, unsigned *gap_count)
bm::id_t bm::bit_block_calc_count_change (const bm::word_t *block, const bm::word_t *block_end, unsigned *bit_count)
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.
BMFORCEINLINE unsigned bm::and_op (unsigned v1, unsigned v2)
 GAP and functor.
BMFORCEINLINE unsigned bm::xor_op (unsigned v1, unsigned v2)
 GAP xor functor.
BMFORCEINLINE unsigned bm::or_op (unsigned v1, unsigned v2)
 GAP or functor.
BMFORCEINLINE unsigned bm::sub_op (unsigned v1, unsigned v2)
 GAP or functor.
BMFORCEINLINE gap_word_t * bm::gap_operation_and (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2, gap_word_t *BMRESTRICT tmp_buf, unsigned &dsize)
 GAP AND operation.
BMFORCEINLINE unsigned bm::gap_operation_any_and (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2)
 GAP AND operation test.
BMFORCEINLINE unsigned bm::gap_count_and (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2)
 GAP bitcount AND operation test.
BMFORCEINLINE gap_word_t * bm::gap_operation_xor (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2, gap_word_t *BMRESTRICT tmp_buf, unsigned &dsize)
 GAP XOR operation.
BMFORCEINLINE unsigned bm::gap_operation_any_xor (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2)
 GAP XOR operation test.
BMFORCEINLINE unsigned bm::gap_count_xor (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2)
 GAP bitcount XOR operation test.
gap_word_t * bm::gap_operation_or (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2, gap_word_t *BMRESTRICT tmp_buf, unsigned &dsize)
 GAP OR operation.
BMFORCEINLINE unsigned bm::gap_count_or (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2)
 GAP bitcount OR operation test.
gap_word_t * bm::gap_operation_sub (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2, gap_word_t *BMRESTRICT tmp_buf, unsigned &dsize)
 GAP SUB (AND NOT) operation.
BMFORCEINLINE unsigned bm::gap_operation_any_sub (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2)
 GAP SUB operation test.
BMFORCEINLINE unsigned bm::gap_count_sub (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2)
 GAP bitcount SUB (AND NOT) operation test.
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_and_any (const bm::word_t *src1, const bm::word_t *src1_end, const bm::word_t *src2)
 Function ANDs two bitblocks and tests for any bit. 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_xor_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2)
 Function XORs two bitblocks and and tests for any bit. 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_sub_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2)
 Function SUBs two bitblocks and and tests for any bit. 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.
unsigned bm::bit_block_or_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2)
 Function ORs two bitblocks and and tests for any bit. Function does not analyse availability of source blocks.
bm::word_tbm::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_and_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2)
 Performs bitblock AND operation test.
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_sub_count_inv (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2)
 Performs inverted bitblock SUB operation and calculates bitcount of the result.
bm::id_t bm::bit_operation_sub_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2)
 Performs bitblock test of SUB operation.
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.
bm::id_t bm::bit_operation_or_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2)
 Performs bitblock OR operation test.
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_tbm::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_tbm::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_tbm::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.
bm::id_t bm::bit_operation_xor_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2)
 Performs bitblock XOR operation test.
template<class T >
unsigned bm::bit_count_nonzero_size (const T *blk, unsigned data_size)
 Inspects block for full zero words.
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 F >
void bm::bit_for_each_4 (T w, F &func)
 Templated algorithm to unpacks octet based word into list of ON bit indexes.
template<typename T , typename F >
void bm::bit_for_each (T w, F &func)
 Templated algorithm to unpacks word into list of ON bit indexes.
template<typename T , typename B >
unsigned bm::bit_list_4 (T w, B *bits)
 Unpacks word into list of ON bit indexes (quad-bit based)
template<typename T , typename B >
unsigned bm::bit_list (T w, B *bits)
 Unpacks word into list of ON bit indexes.
bm::set_representation bm::best_representation (unsigned bit_count, unsigned total_possible_bitcount, unsigned gap_count, unsigned block_size)
 Choose best representation for a bit-block.
template<typename T >
bm::bit_convert_to_arr (T *BMRESTRICT dest, const unsigned *BMRESTRICT src, bm::id_t bits, unsigned dest_len, unsigned mask=0)
 Convert bit block into an array of ints corresponding to 1 bits.
template<typename T >
unsigned bm::gap_overhead (const T *length, const T *length_end, const T *glevel_len)
 Convert bit block into an array of ints corresponding to 1 bits.
template<typename T >
bool bm::improve_gap_levels (const T *length, const T *length_end, T *glevel_len)
 Finds optimal gap blocks lengths.
template<class It1 , class It2 , class BinaryOp , class Encoder >
void bm::bit_recomb (It1 &it1, It2 &it2, BinaryOp &op, Encoder &enc, unsigned block_size=bm::set_block_size)