NCBI C++ ToolKit
|
Search Toolkit Book for bm::deserializer
Deserializer for bit-vector. More...
#include <util/bitset/bmserial.h>
Public Types | |
typedef BV | bvector_type |
typedef bvector_type::allocator_type | allocator_type |
typedef BV::size_type | size_type |
typedef bvector_type::block_idx_type | block_idx_type |
typedef deseriaizer_base< DEC, block_idx_type > | parent_type |
typedef parent_type::decoder_type | decoder_type |
typedef bm::bv_ref_vector< BV > | bv_ref_vector_type |
Public Member Functions | |
deserializer () | |
~deserializer () | |
size_t | deserialize (bvector_type &bv, const unsigned char *buf, bm::word_t *temp_block=0) |
void | set_ref_vectors (const bv_ref_vector_type *ref_vect) |
Attach collection of reference vectors for XOR de-serialization (no transfer of ownership for the pointer) More... | |
void | set_range (size_type from, size_type to) noexcept |
set deserialization range [from, to] This is NOT exact, approximate range, content outside range is not guaranteed to be absent More... | |
void | unset_range () noexcept |
Disable range deserialization. More... | |
void | reset () noexcept |
reset range deserialization and reference vectors More... | |
Protected Types | |
typedef BV::blocks_manager_type | blocks_manager_type |
typedef bm::heap_vector< bm::gap_word_t, allocator_type, true > | block_arridx_type |
typedef bm::heap_vector< bm::word_t, allocator_type, true > | sblock_arridx_type |
typedef allocator_type::allocator_pool_type | allocator_pool_type |
Protected Types inherited from bm::deseriaizer_base< DEC, BV::block_idx_type > | |
typedef DEC | decoder_type |
typedef BV::block_idx_type | block_idx_type |
typedef bm::bit_in< DEC > | bit_in_type |
Protected Member Functions | |
void | xor_decode (blocks_manager_type &bman) |
void | xor_decode_chain (bm::word_t *blk) noexcept |
void | xor_reset () noexcept |
void | deserialize_gap (unsigned char btype, decoder_type &dec, bvector_type &bv, blocks_manager_type &bman, block_idx_type nb, bm::word_t *blk) |
void | decode_bit_block (unsigned char btype, decoder_type &dec, blocks_manager_type &bman, block_idx_type nb, bm::word_t *blk) |
void | decode_block_bit (decoder_type &dec, bvector_type &bv, block_idx_type nb, bm::word_t *blk) |
void | decode_block_bit_interval (decoder_type &dec, bvector_type &bv, block_idx_type nb, bm::word_t *blk) |
void | decode_arrbit (decoder_type &dec, bvector_type &bv, block_idx_type nb, bm::word_t *blk) |
void | decode_arr_sblock (unsigned char btype, decoder_type &dec, bvector_type &bv) |
Protected Member Functions inherited from bm::deseriaizer_base< DEC, BV::block_idx_type > | |
deseriaizer_base () | |
void | read_gap_block (decoder_type &decoder, unsigned block_type, bm::gap_word_t *dst_block, bm::gap_word_t &gap_head) |
Read GAP block from the stream. More... | |
unsigned | read_id_list (decoder_type &decoder, unsigned block_type, bm::gap_word_t *dst_arr) |
Read list of bit ids. More... | |
void | read_bic_arr (decoder_type &decoder, bm::word_t *blk, unsigned block_type) noexcept |
Read binary interpolated list into a bit-set. More... | |
unsigned | read_bic_sb_arr (decoder_type &decoder, unsigned block_type, unsigned *dst_arr, unsigned *sb_idx) |
Read list of bit ids for super-blocks. More... | |
void | read_bic_gap (decoder_type &decoder, bm::word_t *blk) noexcept |
Read binary interpolated gap blocks into a bitset. More... | |
void | read_bic_arr_inv (decoder_type &decoder, bm::word_t *blk) noexcept |
Read inverted binary interpolated list into a bit-set. More... | |
void | read_digest0_block (decoder_type &decoder, bm::word_t *blk) noexcept |
Read digest0-type bit-block. More... | |
block_idx_type | try_skip (decoder_type &decoder, block_idx_type nb, block_idx_type expect_nb) noexcept |
Try to skip if skip bookmark is available within reach. More... | |
Protected Attributes | |
block_arridx_type | bit_idx_arr_ |
sblock_arridx_type | sb_bit_idx_arr_ |
block_arridx_type | gap_temp_block_ |
bm::word_t * | temp_block_ |
allocator_pool_type | pool_ |
allocator_type | alloc_ |
const bv_ref_vector_type * | ref_vect_ |
ref.vector for XOR compression More... | |
bm::word_t * | xor_block_ |
xor product More... | |
bm::word_t * | or_block_ |
size_type | or_block_idx_ |
size_type | x_ref_idx_ |
bm::id64_t | x_ref_d64_ |
block_idx_type | x_nb_ |
unsigned | xor_chain_size_ |
bm::match_pair | xor_chain_ [64] |
unsigned | is_range_set_ |
size_type | idx_from_ |
size_type | idx_to_ |
Protected Attributes inherited from bm::deseriaizer_base< DEC, BV::block_idx_type > | |
bm::gap_word_t * | id_array_ |
ptr to idx array for temp decode use More... | |
unsigned * | sb_id_array_ |
ptr to super-block idx array (temp) More... | |
block_idx_type | bookmark_idx_ |
last bookmark block index More... | |
unsigned | skip_offset_ |
bookmark to skip 256 encoded blocks More... | |
const unsigned char * | skip_pos_ |
decoder skip position More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from bm::deseriaizer_base< DEC, BV::block_idx_type > | |
static void | read_0runs_block (decoder_type &decoder, bm::word_t *blk) noexcept |
read bit-block encoded as runs More... | |
static const char * | err_msg () noexcept |
Deserializer for bit-vector.
Definition at line 568 of file bmserial.h.
|
protected |
Definition at line 665 of file bmserial.h.
typedef bvector_type::allocator_type bm::deserializer< BV, DEC >::allocator_type |
Definition at line 573 of file bmserial.h.
|
protected |
Definition at line 663 of file bmserial.h.
typedef bvector_type::block_idx_type bm::deserializer< BV, DEC >::block_idx_type |
Definition at line 575 of file bmserial.h.
|
protected |
Definition at line 627 of file bmserial.h.
typedef bm::bv_ref_vector<BV> bm::deserializer< BV, DEC >::bv_ref_vector_type |
Definition at line 578 of file bmserial.h.
typedef BV bm::deserializer< BV, DEC >::bvector_type |
Definition at line 572 of file bmserial.h.
typedef parent_type::decoder_type bm::deserializer< BV, DEC >::decoder_type |
Definition at line 577 of file bmserial.h.
typedef deseriaizer_base<DEC, block_idx_type> bm::deserializer< BV, DEC >::parent_type |
Definition at line 576 of file bmserial.h.
|
protected |
Definition at line 664 of file bmserial.h.
typedef BV::size_type bm::deserializer< BV, DEC >::size_type |
Definition at line 574 of file bmserial.h.
bm::deserializer< BV, DEC >::deserializer |
Definition at line 3749 of file bmserial.h.
References bm::deserializer< BV, DEC >::alloc_, bm::deserializer< BV, DEC >::bit_idx_arr_, bm::heap_vector< Val, BVAlloc, trivial_type >::data(), bm::gap_max_bits, bm::deserializer< BV, DEC >::gap_temp_block_, bm::deseriaizer_base< DEC, BV::block_idx_type >::id_array_, bm::deserializer< BV, DEC >::pool_, bm::heap_vector< Val, BVAlloc, trivial_type >::resize(), bm::deserializer< BV, DEC >::sb_bit_idx_arr_, bm::deseriaizer_base< DEC, BV::block_idx_type >::sb_id_array_, and bm::deserializer< BV, DEC >::temp_block_.
bm::deserializer< BV, DEC >::~deserializer |
Definition at line 3770 of file bmserial.h.
References BM_ASSERT.
|
protected |
Definition at line 4003 of file bmserial.h.
References arr, bm::gap_max_bits, i, len, and bm::set_sub_array_size.
|
protected |
Definition at line 4084 of file bmserial.h.
References bm::bit_block_set(), BM_IS_GAP, IS_FULL_BLOCK, len, and bm::set_bit().
|
protected |
Definition at line 3938 of file bmserial.h.
References bm::bit_block_or(), bm::bit_block_set(), bm::bit_invert(), BM_ASSERT, BM_IS_GAP, bm::clear_bit(), IS_FULL_BLOCK, len, bm::set_block_arr_bienc, bm::set_block_arr_bienc_8bh, bm::set_block_arr_bienc_inv, bm::set_block_arrbit_inv, bm::set_block_bit_digest0, and bm::set_block_bitgap_bienc.
|
protected |
Definition at line 4037 of file bmserial.h.
References bm::BM_OR, and bm::set_block_size.
|
protected |
Definition at line 4057 of file bmserial.h.
References bm::bit_block_set(), bm::BM_OR, and bm::set_block_size.
size_t bm::deserializer< BV, DEC >::deserialize | ( | bvector_type & | bv, |
const unsigned char * | buf, | ||
bm::word_t * | temp_block = 0 |
||
) |
Deserialize bit-vector (equivalent to logical OR)
bv | - target bit-vector |
buf | - BLOB memory pointer |
temp_block | - temporary buffer [block size] (not used) |
Definition at line 4122 of file bmserial.h.
References bm::bits_in_block, BM_ASSERT, bm::BM_GAP, bm::BM_HM_64_BIT, bm::BM_HM_HXOR, bm::BM_HM_ID_LIST, bm::BM_HM_NO_BO, bm::BM_HM_NO_GAPL, bm::BM_HM_RESIZE, BM_IS_GAP, bm::BM_OR, buf, cnt, bm::gap_levels, bm::gap_max_bits, bm::get_block_coord(), bm::id_max, bm::set_block_16one, bm::set_block_16zero, bm::set_block_1one, bm::set_block_1zero, bm::set_block_32one, bm::set_block_32zero, bm::set_block_64one, bm::set_block_64zero, bm::set_block_8one, bm::set_block_8zero, bm::set_block_aone, bm::set_block_arr_bienc, bm::set_block_arr_bienc_8bh, bm::set_block_arr_bienc_inv, bm::set_block_arrbit, bm::set_block_arrbit_inv, bm::set_block_arrgap, bm::set_block_arrgap_bienc, bm::set_block_arrgap_bienc_inv, bm::set_block_arrgap_bienc_inv_v2, bm::set_block_arrgap_bienc_v2, bm::set_block_arrgap_egamma, bm::set_block_arrgap_egamma_inv, bm::set_block_arrgap_inv, bm::set_block_azero, bm::set_block_bit, bm::set_block_bit_0runs, bm::set_block_bit_1bit, bm::set_block_bit_digest0, bm::set_block_bit_interval, bm::set_block_bitgap_bienc, bm::set_block_end, bm::set_block_gap, bm::set_block_gap_bienc, bm::set_block_gap_bienc_v2, bm::set_block_gap_egamma, bm::set_block_gapbit, bm::set_block_ref_eq, bm::set_block_shift, bm::set_block_xor_chain, bm::set_block_xor_gap_ref16, bm::set_block_xor_gap_ref32, bm::set_block_xor_gap_ref8, bm::set_block_xor_ref16, bm::set_block_xor_ref16_um, bm::set_block_xor_ref32, bm::set_block_xor_ref32_um, bm::set_block_xor_ref8, bm::set_block_xor_ref8_um, bm::set_nb_bookmark16, bm::set_nb_bookmark24, bm::set_nb_bookmark32, bm::set_nb_sync_mark16, bm::set_nb_sync_mark24, bm::set_nb_sync_mark32, bm::set_nb_sync_mark48, bm::set_nb_sync_mark64, bm::set_nb_sync_mark8, bm::set_sblock_bienc, bm::set_sub_array_size, and bm::set_total_blocks.
Referenced by bm::deserialize(), bm::operation_deserializer< bvector_type >::deserialize(), CDataFrame< MAX_SIZE >::Deserialize(), bm::deserialize_range(), bm::operation_deserializer< BV >::deserialize_xor_range(), NULL_serial_search_test(), test_chr21(), and TestStrSparseVector().
|
protected |
Definition at line 3788 of file bmserial.h.
References BM_ASSERT, BM_FALLTHROUGH, BMGAP_PTR, BMPTR_SETBIT0, BMSET_PTRGAP, bm::gap_calc_level(), bm::gap_convert_to_bitset(), bm::gap_invert(), bm::gap_length(), bm::gap_max_bits, bm::gap_set_array(), bm::get_block_coord(), len, bm::set_block_arrgap, bm::set_block_arrgap_bienc, bm::set_block_arrgap_bienc_inv, bm::set_block_arrgap_bienc_inv_v2, bm::set_block_arrgap_bienc_v2, bm::set_block_arrgap_egamma, bm::set_block_arrgap_egamma_inv, bm::set_block_arrgap_inv, bm::set_block_gap, bm::set_block_gap_bienc, bm::set_block_gap_bienc_v2, bm::set_block_gap_egamma, bm::set_block_gapbit, and bm::set_gap_level().
|
inlinenoexcept |
reset range deserialization and reference vectors
Definition at line 624 of file bmserial.h.
|
inlinenoexcept |
set deserialization range [from, to] This is NOT exact, approximate range, content outside range is not guaranteed to be absent
Definition at line 610 of file bmserial.h.
Referenced by bm::deserialize_range(), and bm::operation_deserializer< BV >::deserialize_xor_range().
void bm::deserializer< BV, DEC >::set_ref_vectors | ( | const bv_ref_vector_type * | ref_vect | ) |
Attach collection of reference vectors for XOR de-serialization (no transfer of ownership for the pointer)
Definition at line 3779 of file bmserial.h.
Referenced by bm::deserialize(), bm::deserialize_range(), bm::operation_deserializer< BV >::deserialize_xor_range(), and bm::deserializer< BV, bm::decoder >::reset().
|
inlinenoexcept |
Disable range deserialization.
Definition at line 619 of file bmserial.h.
Referenced by bm::deserializer< BV, bm::decoder >::reset().
|
protected |
Definition at line 4622 of file bmserial.h.
References bm::bit_block_or(), bm::bit_block_xor(), BM_ASSERT, BM_IS_GAP, BMGAP_PTR, FULL_BLOCK_REAL_ADDR, bm::gap_convert_to_bitset(), bm::gap_operation_xor(), bm::get_block_coord(), IS_FULL_BLOCK, and bm::set_block_shift.
|
protectednoexcept |
Definition at line 4591 of file bmserial.h.
References bm::bit_block_xor(), BM_ASSERT, BM_IS_GAP, BMGAP_PTR, BMRESTRICT, FULL_BLOCK_REAL_ADDR, bm::gap_convert_to_bitset(), bm::get_block_coord(), and IS_FULL_BLOCK.
|
protectednoexcept |
Definition at line 4738 of file bmserial.h.
|
protected |
Definition at line 674 of file bmserial.h.
Referenced by bm::deserializer< BV, DEC >::deserializer().
|
protected |
Definition at line 668 of file bmserial.h.
Referenced by bm::deserializer< BV, DEC >::deserializer().
|
protected |
Definition at line 670 of file bmserial.h.
Referenced by bm::deserializer< BV, DEC >::deserializer().
|
protected |
Definition at line 694 of file bmserial.h.
Referenced by bm::deserializer< BV, bm::decoder >::set_range().
|
protected |
Definition at line 695 of file bmserial.h.
Referenced by bm::deserializer< BV, bm::decoder >::set_range().
|
protected |
Definition at line 693 of file bmserial.h.
Referenced by bm::deserializer< BV, bm::decoder >::set_range(), bm::deserializer< BV, bm::decoder >::unset_range(), and bm::iterator_deserializer< BV, bm::serial_stream_iterator >::unset_range().
|
protected |
Definition at line 680 of file bmserial.h.
|
protected |
Definition at line 681 of file bmserial.h.
|
protected |
Definition at line 673 of file bmserial.h.
Referenced by bm::deserializer< BV, DEC >::deserializer().
|
protected |
ref.vector for XOR compression
Definition at line 678 of file bmserial.h.
Referenced by bm::operation_deserializer< bvector_type >::set_ref_vectors().
|
protected |
Definition at line 669 of file bmserial.h.
Referenced by bm::deserializer< BV, DEC >::deserializer().
|
protected |
Definition at line 671 of file bmserial.h.
Referenced by bm::deserializer< BV, DEC >::deserializer().
|
protected |
Definition at line 687 of file bmserial.h.
|
protected |
Definition at line 686 of file bmserial.h.
|
protected |
Definition at line 685 of file bmserial.h.
|
protected |
xor product
Definition at line 679 of file bmserial.h.
|
protected |
Definition at line 689 of file bmserial.h.
|
protected |
Definition at line 688 of file bmserial.h.