BitMagic-C++
|
Algorithms for fast aggregation of a group of bit-vectors. More...
#include <bmaggregator.h>
Data Structures | |
struct | arena |
Temporary operations vectors. More... | |
struct | arg_groups |
Aggregator arg groups. More... | |
class | pipeline |
Pipeline vector for running a group of aggregation operations on a family of vectors. More... | |
struct | pipeline_bcache |
Block cache for pipeline execution. More... | |
struct | run_options |
Aggregation options for runtime control. More... | |
Public Types | |
enum | operation { BM_NOT_DEFINED = 0 , BM_SHIFT_R_AND = 1 } |
Codes for aggregation operations which can be pipelined for efficient execution. More... | |
enum | operation_status { op_undefined = 0 , op_prepared , op_in_progress , op_done } |
typedef BV | bvector_type |
typedef BV::size_type | size_type |
typedef BV::allocator_type | allocator_type |
typedef const bvector_type * | bvector_type_const_ptr |
typedef bm::id64_t | digest_type |
typedef bvector_type::allocator_type::allocator_pool_type | allocator_pool_type |
typedef bm::heap_vector< bvector_type_const_ptr, allocator_type, true > | bv_vector_type |
typedef bm::heap_vector< bvector_type *, allocator_type, true > | bvect_vector_type |
typedef bm::heap_vector< size_t, allocator_type, true > | index_vector_type |
typedef arg_groups * | arg_groups_type_ptr |
typedef bm::heap_vector< arg_groups_type_ptr, allocator_type, true > | arg_vector_type |
typedef bm::heap_vector< unsigned, allocator_type, true > | count_vector_type |
typedef bm::heap_vector< size_type, allocator_type, true > | bv_count_vector_type |
typedef bm::heap_vector< bm::word_t *, allocator_type, true > | blockptr_vector_type |
typedef bm::heap_vector< bm::pair< unsigned, unsigned >, allocator_type, true > | block_ij_vector_type |
Public Member Functions | |
Construction and setup | |
aggregator () | |
More... | |
~aggregator () | |
More... | |
void | set_optimization (typename bvector_type::optmode opt=bvector_type::opt_compress) BMNOEXCEPT |
set on-the-fly bit-block compression By default aggregator does not try to optimize result, but in some cases it can be quite a lot faster than calling bvector<>::optimize() later (because block data sits in CPU cache). More... | |
void | set_compute_count (bool count_mode) BMNOEXCEPT |
Methods to setup argument groups and run operations on groups | |
size_t | add (const bvector_type *bv, unsigned agr_group=0) |
Attach source bit-vector to a argument group (0 or 1). More... | |
void | reset () |
Reset aggregate groups, forget all attached vectors. More... | |
void | combine_or (bvector_type &bv_target) |
Aggregate added group of vectors using logical OR Operation does NOT perform an explicit reset of arg group(s) More... | |
void | combine_and (bvector_type &bv_target) |
Aggregate added group of vectors using logical AND Operation does NOT perform an explicit reset of arg group(s) More... | |
bool | combine_and_sub (bvector_type &bv_target) |
Aggregate added group of vectors using fused logical AND-SUB Operation does NOT perform an explicit reset of arg group(s) More... | |
template<class TPipe > | |
void | combine_and_sub (TPipe &pipe) |
Run AND-SUB: AND (groups1) AND NOT ( OR(group0)) for a pipeline. More... | |
bool | combine_and_sub (bvector_type &bv_target, bool any) |
Aggregate added group of vectors using fused logical AND-SUB Operation does NOT perform an explicit reset of arg group(s) Operation can terminate early if anything was found. More... | |
template<typename BII > | |
bool | combine_and_sub_bi (BII bi) |
Aggregate added group of vectors using fused logical AND-SUB. More... | |
bool | find_first_and_sub (size_type &idx) |
Aggregate added group of vectors using fused logical AND-SUB, find the first match. More... | |
void | combine_shift_right_and (bvector_type &bv_target) |
Aggregate added group of vectors using SHIFT-RIGHT and logical AND Operation does NOT perform an explicit reset of arg group(s) More... | |
void | set_range_hint (size_type from, size_type to) BMNOEXCEPT |
Set search hint for the range, where results needs to be searched (experimental for internal use). More... | |
void | reset_range_hint () BMNOEXCEPT |
Reset range hint to false. More... | |
size_type | count () const |
Logical operations (C-style interface) | |
void | combine_or (bvector_type &bv_target, const bvector_type_const_ptr *bv_src, size_t src_size) |
Aggregate group of vectors using logical OR. More... | |
void | combine_and (bvector_type &bv_target, const bvector_type_const_ptr *bv_src, size_t src_size) |
Aggregate group of vectors using logical AND. More... | |
bool | combine_and_sub (bvector_type &bv_target, const bvector_type_const_ptr *bv_src_and, size_t src_and_size, const bvector_type_const_ptr *bv_src_sub, size_t src_sub_size, bool any) |
Fusion aggregate group of vectors using logical AND MINUS another set. More... | |
template<typename BII > | |
bool | combine_and_sub (BII bi, const bvector_type_const_ptr *bv_src_and, size_t src_and_size, const bvector_type_const_ptr *bv_src_sub, size_t src_sub_size) |
More... | |
bool | find_first_and_sub (size_type &idx, const bvector_type_const_ptr *bv_src_and, size_t src_and_size, const bvector_type_const_ptr *bv_src_sub, size_t src_sub_size) |
More... | |
bool | combine_shift_right_and (bvector_type &bv_target, const bvector_type_const_ptr *bv_src_and, size_t src_and_size, bool any) |
Fusion aggregate group of vectors using SHIFT right with AND. More... | |
Horizontal Logical operations used for tests (C-style interface) | |
void | combine_or_horizontal (bvector_type &bv_target, const bvector_type_const_ptr *bv_src, size_t src_size) |
Horizontal OR aggregation (potentially slower) method. More... | |
void | combine_and_horizontal (bvector_type &bv_target, const bvector_type_const_ptr *bv_src, size_t src_size) |
Horizontal AND aggregation (potentially slower) method. More... | |
void | combine_and_sub_horizontal (bvector_type &bv_target, const bvector_type_const_ptr *bv_src_and, size_t src_and_size, const bvector_type_const_ptr *bv_src_sub, size_t src_sub_size) |
Horizontal AND-SUB aggregation (potentially slower) method. More... | |
Pipeline operations | |
int | get_operation () const BMNOEXCEPT |
Get current operation code. More... | |
void | set_operation (int op_code) BMNOEXCEPT |
Set operation code for the aggregator. More... | |
void | stage (bm::word_t *temp_block) |
Prepare operation, create internal resources, analyse dependencies. More... | |
operation_status | run_step (unsigned i, unsigned j) |
Run a step of current arrgegation operation. More... | |
operation_status | get_operation_status () const |
const bvector_type * | get_target () const BMNOEXCEPT |
More... | |
bm::word_t * | get_temp_block () BMNOEXCEPT |
Execition metrics and telemetry <br> | |
typedef bvector_type::blocks_manager_type | blocks_manager_type |
typedef BV::block_idx_type | block_idx_type |
typedef bm::heap_vector< const bm::word_t *, allocator_type, true > | block_ptr_vector_type |
typedef bm::heap_vector< const bm::gap_word_t *, allocator_type, true > | gap_block_ptr_vector_type |
typedef bm::heap_vector< unsigned char, allocator_type, true > | uchar_vector_type |
bm::id64_t | get_cache_gap_hits () const BMNOEXCEPT |
void | reset_vars () |
void | combine_or (unsigned i, unsigned j, bvector_type &bv_target, const bvector_type_const_ptr *bv_src, size_t src_size) |
More... | |
void | combine_and (unsigned i, unsigned j, bvector_type &bv_target, const bvector_type_const_ptr *bv_src, size_t src_size) |
More... | |
digest_type | combine_and_sub (unsigned i, unsigned j, const size_t *and_idx, const bvector_type_const_ptr *bv_src_and, size_t src_and_size, const size_t *sub_idx, const bvector_type_const_ptr *bv_src_sub, size_t src_sub_size, int *is_result_full) |
More... | |
void | prepare_shift_right_and (bvector_type &bv_target, const bvector_type_const_ptr *bv_src, size_t src_size) |
bool | combine_shift_right_and (unsigned i, unsigned j, bvector_type &bv_target, const bvector_type_const_ptr *bv_src, size_t src_size) |
More... | |
bm::word_t * | sort_input_blocks_or (const size_t *src_idx, const bvector_type_const_ptr *bv_src, size_t src_size, unsigned i, unsigned j) |
More... | |
bm::word_t * | sort_input_blocks_and (const size_t *src_idx, const bvector_type_const_ptr *bv_src, size_t src_size, unsigned i, unsigned j) |
More... | |
bm::word_t * | cache_gap_block (const bm::word_t *arg_blk, const size_t *src_idx, size_t k, unsigned i, unsigned j) |
More... | |
bool | process_bit_blocks_or (blocks_manager_type &bman_target, unsigned i, unsigned j, const arena &ar) |
More... | |
void | process_gap_blocks_or (const arena &ar) |
More... | |
digest_type | process_bit_blocks_and (const arena &ar, digest_type digest) |
More... | |
digest_type | process_gap_blocks_and (const arena &ar, digest_type digest) |
More... | |
bool | test_gap_blocks_and (size_t block_count, unsigned bit_idx) |
More... | |
bool | test_gap_blocks_sub (size_t block_count, unsigned bit_idx) |
More... | |
digest_type | process_bit_blocks_sub (const arena &ar, digest_type digest) |
More... | |
digest_type | process_gap_blocks_sub (const arena &ar, digest_type digest) |
More... | |
bvector_type * | check_create_target () |
static unsigned | resize_target (bvector_type &bv_target, const bvector_type_const_ptr *bv_src, size_t src_size, bool init_clear=true) |
More... | |
static unsigned | max_top_blocks (const bvector_type_const_ptr *bv_src, size_t src_size) BMNOEXCEPT |
static unsigned | find_effective_sub_block_size (unsigned i, const bvector_type_const_ptr *bv_src, size_t src_size, bool top_null_as_zero) BMNOEXCEPT |
More... | |
static unsigned | find_effective_sub_block_size (unsigned i, const bvector_type_const_ptr *bv_src1, size_t src_size1, const bvector_type_const_ptr *bv_src2, size_t src_size2) BMNOEXCEPT |
static bool | any_carry_overs (const unsigned char *carry_overs, size_t co_size) BMNOEXCEPT |
static unsigned | process_shift_right_and (bm::word_t *BMRESTRICT blk, const bm::word_t *BMRESTRICT arg_blk, digest_type &BMRESTRICT digest, unsigned carry_over) BMNOEXCEPT |
More... | |
static const bm::word_t * | get_arg_block (const bvector_type_const_ptr *bv_src, unsigned k, unsigned i, unsigned j) BMNOEXCEPT |
static arena * | construct_arena () |
More... | |
static void | free_arena (arena *ar) BMNOEXCEPT |
More... | |
static arg_groups * | construct_arg_group () |
More... | |
static void | free_arg_group (arg_groups *arg) |
More... | |
Algorithms for fast aggregation of a group of bit-vectors.
Algorithms of this class use cache locality optimizations and efficient on cases, wehen we need to apply the same logical operation (aggregate) more than 2x vectors.
TARGET = BV1 or BV2 or BV3 or BV4 ...
Aggregator supports OR, AND and AND-MINUS (AND-SUB) operations
Definition at line 121 of file bmaggregator.h.
enum bm::aggregator::operation |
Codes for aggregation operations which can be pipelined for efficient execution.
Enumerator | |
---|---|
BM_NOT_DEFINED | |
BM_SHIFT_R_AND |
Definition at line 141 of file bmaggregator.h.
enum bm::aggregator::operation_status |
Enumerator | |
---|---|
op_undefined | |
op_prepared | |
op_in_progress | |
op_done |
Definition at line 147 of file bmaggregator.h.
size_t bm::aggregator< BV >::add | ( | const bvector_type * | bv, |
unsigned | agr_group = 0 |
||
) |
Attach source bit-vector to a argument group (0 or 1).
Arg group 1 used for fused operations like (AND-SUB)
bv | - input bit-vector pointer to attach |
agr_group | - input argument group (0 - default, 1 - fused op) |
Definition at line 986 of file bmaggregator.h.
Referenced by DemoAND(), DemoAND_OR(), DemoAND_SUB(), DemoOR(), DemoSUB(), DNA_FingerprintScanner::FindAggFused(), main(), and CSeqClusters::union_all_groups().
|
protected |
Definition at line 2281 of file bmaggregator.h.
References bm::aligned_new_malloc(), BM_ASSERT, BMGAP_PTR, bm::pair< First, Second >::first, bm::gap_convert_to_bitset(), bm::pair< First, Second >::second, and bm::set_block_size.
void bm::aggregator< BV >::combine_and | ( | bvector_type & | bv_target | ) |
Aggregate added group of vectors using logical AND Operation does NOT perform an explicit reset of arg group(s)
bv_target | - target vector (input is arg group 0) |
Definition at line 1003 of file bmaggregator.h.
References BM_ASSERT.
void bm::aggregator< BV >::combine_and | ( | bvector_type & | bv_target, |
const bvector_type_const_ptr * | bv_src, | ||
size_t | src_size | ||
) |
Aggregate group of vectors using logical AND.
bv_target | - target vector |
bv_src | - array of pointers on bit-vector aggregate arguments |
src_size | - size of bv_src (how many vectors to aggregate) |
Definition at line 1100 of file bmaggregator.h.
References BM_ASSERT, and bm::combine_and().
|
protected |
Definition at line 1651 of file bmaggregator.h.
References BM_ASSERT, FULL_BLOCK_FAKE_ADDR, FULL_BLOCK_REAL_ADDR, and bm::set_sub_array_size.
void bm::aggregator< BV >::combine_and_horizontal | ( | bvector_type & | bv_target, |
const bvector_type_const_ptr * | bv_src, | ||
size_t | src_size | ||
) |
Horizontal AND aggregation (potentially slower) method.
bv_target | - target vector |
bv_src | - array of pointers on bit-vector aggregate arguments |
src_size | - size of bv_src (how many vectors to aggregate) |
Definition at line 2341 of file bmaggregator.h.
References BM_ASSERT, and bm::READWRITE.
bool bm::aggregator< BV >::combine_and_sub | ( | BII | bi, |
const bvector_type_const_ptr * | bv_src_and, | ||
size_t | src_and_size, | ||
const bvector_type_const_ptr * | bv_src_sub, | ||
size_t | src_sub_size | ||
) |
Definition at line 1198 of file bmaggregator.h.
References bm::bits_in_block, BM_ASSERT, bm::for_each_bit_blk(), and bm::set_sub_array_size.
bool bm::aggregator< BV >::combine_and_sub | ( | bvector_type & | bv_target | ) |
Aggregate added group of vectors using fused logical AND-SUB Operation does NOT perform an explicit reset of arg group(s)
bv_target | - target vector (input is arg group 0(AND), 1(SUB) ) |
Definition at line 1017 of file bmaggregator.h.
References BM_ASSERT.
Referenced by DemoAND_OR(), DemoAND_SUB(), DemoSUB(), and main().
bool bm::aggregator< BV >::combine_and_sub | ( | bvector_type & | bv_target, |
bool | any | ||
) |
Aggregate added group of vectors using fused logical AND-SUB Operation does NOT perform an explicit reset of arg group(s) Operation can terminate early if anything was found.
bv_target | - target vector (input is arg group 0(AND), 1(SUB) ) |
any | - if true, search result will terminate of first found result |
Definition at line 1029 of file bmaggregator.h.
References BM_ASSERT.
bool bm::aggregator< BV >::combine_and_sub | ( | bvector_type & | bv_target, |
const bvector_type_const_ptr * | bv_src_and, | ||
size_t | src_and_size, | ||
const bvector_type_const_ptr * | bv_src_sub, | ||
size_t | src_sub_size, | ||
bool | any | ||
) |
Fusion aggregate group of vectors using logical AND MINUS another set.
bv_target | - target vector |
bv_src_and | - array of pointers on bit-vectors for AND |
src_and_size | - size of AND group |
bv_src_sub | - array of pointers on bit-vectors for SUBstract |
src_sub_size | - size of SUB group |
any | - flag if caller needs any results asap (incomplete results) |
Definition at line 1135 of file bmaggregator.h.
References BM_ASSERT, FULL_BLOCK_FAKE_ADDR, bm::bvector< Alloc >::opt_compress, and bm::set_sub_array_size.
void bm::aggregator< BV >::combine_and_sub | ( | TPipe & | pipe | ) |
Run AND-SUB: AND (groups1) AND NOT ( OR(group0)) for a pipeline.
pipe | - pipeline to run (should be prepared, filled and complete |
Definition at line 1265 of file bmaggregator.h.
References bm::aggregator< BV >::arg_groups::arg_bv0, bm::aggregator< BV >::arg_groups::arg_bv1, bm::aggregator< BV >::arg_groups::arg_idx0, bm::aggregator< BV >::arg_groups::arg_idx1, bm::bit_block_count(), BM_ASSERT, bm::BM_GAP, FULL_BLOCK_FAKE_ADDR, bm::gap_max_bits, bm::get_block_coord(), bm::bvector< Alloc >::opt_compress, bm::set_block_shift, and bm::set_sub_array_size.
|
protected |
Definition at line 1706 of file bmaggregator.h.
References BM_ASSERT, FULL_BLOCK_FAKE_ADDR, and FULL_BLOCK_REAL_ADDR.
bool bm::aggregator< BV >::combine_and_sub_bi | ( | BII | bi | ) |
Aggregate added group of vectors using fused logical AND-SUB.
search traget is back_inserter
Definition at line 1041 of file bmaggregator.h.
void bm::aggregator< BV >::combine_and_sub_horizontal | ( | bvector_type & | bv_target, |
const bvector_type_const_ptr * | bv_src_and, | ||
size_t | src_and_size, | ||
const bvector_type_const_ptr * | bv_src_sub, | ||
size_t | src_sub_size | ||
) |
Horizontal AND-SUB aggregation (potentially slower) method.
bv_target | - target vector |
bv_src_and | - array of pointers on bit-vector to AND aggregate |
src_and_size | - size of bv_src_and |
bv_src_sub | - array of pointers on bit-vector to SUB aggregate |
src_sub_size | - size of bv_src_sub |
Definition at line 2366 of file bmaggregator.h.
References BM_ASSERT.
void bm::aggregator< BV >::combine_or | ( | bvector_type & | bv_target | ) |
Aggregate added group of vectors using logical OR Operation does NOT perform an explicit reset of arg group(s)
bv_target | - target vector (input is arg group 0) |
Definition at line 994 of file bmaggregator.h.
References BM_ASSERT, and bm::combine_or().
Referenced by DemoOR(), main(), and CSeqClusters::union_all_groups().
void bm::aggregator< BV >::combine_or | ( | bvector_type & | bv_target, |
const bvector_type_const_ptr * | bv_src, | ||
size_t | src_size | ||
) |
Aggregate group of vectors using logical OR.
bv_target | - target vector |
bv_src | - array of pointers on bit-vector aggregate arguments |
src_size | - size of bv_src (how many vectors to aggregate) |
Definition at line 1074 of file bmaggregator.h.
References BM_ASSERT, and bm::combine_or().
|
protected |
Definition at line 1609 of file bmaggregator.h.
References BM_ASSERT, FULL_BLOCK_FAKE_ADDR, and bm::set_sub_array_size.
void bm::aggregator< BV >::combine_or_horizontal | ( | bvector_type & | bv_target, |
const bvector_type_const_ptr * | bv_src, | ||
size_t | src_size | ||
) |
Horizontal OR aggregation (potentially slower) method.
bv_target | - target vector |
bv_src | - array of pointers on bit-vector aggregate arguments |
src_size | - size of bv_src (how many vectors to aggregate) |
Definition at line 2317 of file bmaggregator.h.
References BM_ASSERT, and bm::READWRITE.
void bm::aggregator< BV >::combine_shift_right_and | ( | bvector_type & | bv_target | ) |
Aggregate added group of vectors using SHIFT-RIGHT and logical AND Operation does NOT perform an explicit reset of arg group(s)
bv_target | - target vector (input is arg group 0) |
Definition at line 1062 of file bmaggregator.h.
References BM_ASSERT.
Referenced by DNA_FingerprintScanner::FindAggFused().
bool bm::aggregator< BV >::combine_shift_right_and | ( | bvector_type & | bv_target, |
const bvector_type_const_ptr * | bv_src_and, | ||
size_t | src_and_size, | ||
bool | any | ||
) |
Fusion aggregate group of vectors using SHIFT right with AND.
bv_target | - target vector |
bv_src_and | - array of pointers on bit-vectors for AND masking |
src_and_size | - size of AND group |
any | - flag if caller needs any results asap (incomplete results) |
Definition at line 2403 of file bmaggregator.h.
References bm::set_sub_array_size, and bm::set_top_array_size.
|
protected |
Definition at line 2443 of file bmaggregator.h.
References bm::bit_block_copy(), bm::bit_block_count(), bm::bit_block_set(), bm::bit_is_all_zero(), BM_ASSERT, BM_IS_GAP, BMGAP_PTR, and bm::gap_add_to_bitset().
|
inlinestaticprotected |
Definition at line 782 of file bmaggregator.h.
References bm::aligned_new_malloc().
Referenced by bm::aggregator< BV >::aggregator().
|
inlinestaticprotected |
Definition at line 794 of file bmaggregator.h.
References bm::aligned_new_malloc().
|
staticprotected |
Definition at line 1540 of file bmaggregator.h.
References BM_ASSERT, FULL_BLOCK_FAKE_ADDR, max_size, and bm::set_sub_array_size.
bool bm::aggregator< BV >::find_first_and_sub | ( | size_type & | idx | ) |
Aggregate added group of vectors using fused logical AND-SUB, find the first match.
idx | - [out] index of the first occurence |
Definition at line 1052 of file bmaggregator.h.
bool bm::aggregator< BV >::find_first_and_sub | ( | size_type & | idx, |
const bvector_type_const_ptr * | bv_src_and, | ||
size_t | src_and_size, | ||
const bvector_type_const_ptr * | bv_src_sub, | ||
size_t | src_sub_size | ||
) |
Definition at line 1434 of file bmaggregator.h.
References bm::bit_find_first(), bm::block_to_global_index(), BM_ASSERT, bm::set_array_mask, bm::set_array_shift, bm::set_block_shift, and bm::set_sub_array_size.
|
inlinestaticprotected |
Definition at line 787 of file bmaggregator.h.
References bm::aligned_free().
|
inlinestaticprotected |
Definition at line 800 of file bmaggregator.h.
References bm::aligned_free().
|
inline |
Get current operation code.
Definition at line 605 of file bmaggregator.h.
|
inline |
Definition at line 623 of file bmaggregator.h.
Referenced by DNA_FingerprintScanner::FindCollection().
|
protected |
Definition at line 1962 of file bmaggregator.h.
References bm::bit_block_and(), bm::bit_block_and_2way(), bm::bit_block_and_5way(), bm::bit_block_copy(), bm::bit_find_first_if_1(), bm::block_init_digest0(), bm::calc_block_digest0(), bm::digest_mask(), bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, bm::set_word_shift, bm::aggregator< BV >::arena::v_arg_and_blk, and bm::word_bitcount64().
|
protected |
Definition at line 1892 of file bmaggregator.h.
References bm::bit_block_copy(), bm::bit_block_or(), bm::bit_block_or_3way(), bm::bit_block_or_5way(), bm::bit_block_set(), BM_ASSERT, FULL_BLOCK_FAKE_ADDR, bm::is_bits_one(), and bm::aggregator< BV >::arena::v_arg_or_blk.
|
protected |
Definition at line 2048 of file bmaggregator.h.
References bm::bit_block_sub(), bm::bit_find_first_if_1(), bm::set_word_mask, bm::set_word_shift, bm::aggregator< BV >::arena::v_arg_or_blk, and bm::word_bitcount64().
|
protected |
Definition at line 1787 of file bmaggregator.h.
References bm::bit_find_first_if_1(), bm::bit_is_all_zero(), BM_ASSERT, bm::gap_and_to_bitset(), bm::gap_test_unr(), bm::update_block_digest0(), bm::aggregator< BV >::arena::v_arg_and_blk_gap, and bm::word_bitcount64().
|
protected |
Definition at line 1775 of file bmaggregator.h.
References bm::gap_add_to_bitset(), and bm::aggregator< BV >::arena::v_arg_or_blk_gap.
|
protected |
Definition at line 1825 of file bmaggregator.h.
References bm::bit_find_first_if_1(), bm::bit_is_all_zero(), BM_ASSERT, bm::gap_sub_to_bitset(), bm::gap_test_unr(), bm::update_block_digest0(), bm::aggregator< BV >::arena::v_arg_or_blk_gap, and bm::word_bitcount64().
|
staticprotected |
Definition at line 2522 of file bmaggregator.h.
References bm::bit_block_set(), bm::bit_block_shift_r1_and_unr(), BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::calc_block_digest0(), FULL_BLOCK_REAL_ADDR, bm::gap_and_to_bitset(), bm::set_block_size, and bm::update_block_digest0().
void bm::aggregator< BV >::reset |
Reset aggregate groups, forget all attached vectors.
Definition at line 932 of file bmaggregator.h.
Referenced by DemoAND(), DemoAND_SUB(), DemoOR(), DemoSUB(), DNA_FingerprintScanner::FindAggFused(), main(), and CSeqClusters::union_all_groups().
void bm::aggregator< BV >::reset_range_hint |
|
staticprotected |
Definition at line 2093 of file bmaggregator.h.
References BM_ASSERT.
aggregator< BV >::operation_status bm::aggregator< BV >::run_step | ( | unsigned | i, |
unsigned | j | ||
) |
Run a step of current arrgegation operation.
Definition at line 2630 of file bmaggregator.h.
References BM_ASSERT, and bm::set_sub_array_size.
|
inline |
Set operation code for the aggregator.
Definition at line 608 of file bmaggregator.h.
|
inline |
set on-the-fly bit-block compression By default aggregator does not try to optimize result, but in some cases it can be quite a lot faster than calling bvector<>::optimize() later (because block data sits in CPU cache).
opt | - optimization mode (full compression by default) |
Definition at line 359 of file bmaggregator.h.
Referenced by DemoAND(), DemoAND_SUB(), DemoOR(), DemoSUB(), and CSeqClusters::union_all_groups().
void bm::aggregator< BV >::set_range_hint | ( | size_type | from, |
size_type | to | ||
) |
Set search hint for the range, where results needs to be searched (experimental for internal use).
Definition at line 963 of file bmaggregator.h.
|
protected |
Definition at line 2206 of file bmaggregator.h.
References BM_IS_GAP, BMGAP_PTR, FULL_BLOCK_FAKE_ADDR, FULL_BLOCK_REAL_ADDR, and bm::gap_length().
|
protected |
Definition at line 2162 of file bmaggregator.h.
References BM_ASSERT, BM_IS_GAP, BMGAP_PTR, and FULL_BLOCK_FAKE_ADDR.
void bm::aggregator< BV >::stage | ( | bm::word_t * | temp_block | ) |
Prepare operation, create internal resources, analyse dependencies.
Prerequisites are: that operation is set and all argument vectors are added
Definition at line 2606 of file bmaggregator.h.
References BM_ASSERT.
|
protected |
Definition at line 1863 of file bmaggregator.h.
References bm::gap_test_unr().
|
protected |
Definition at line 1875 of file bmaggregator.h.
References bm::gap_test_unr().