NCBI C++ ToolKit
|
Search Toolkit Book for bm::operation_deserializer
Deserializer, performs logical operations between bit-vector and serialized bit-vector. More...
#include <util/bitset/bmserial.h>
Public Types | |
typedef BV | bvector_type |
typedef BV::allocator_type | allocator_type |
typedef bvector_type::size_type | size_type |
typedef bm::bv_ref_vector< BV > | bv_ref_vector_type |
Public Member Functions | |
operation_deserializer () | |
~operation_deserializer () | |
size_type | deserialize (bvector_type &bv, const unsigned char *buf, set_operation op, bool exit_on_one=false) |
Deserialize bvector using buffer as set operation argument. More... | |
void | deserialize_range (bvector_type &bv, const unsigned char *buf, size_type idx_from, size_type idx_to) |
size_type | deserialize (bvector_type &bv, const unsigned char *buf, bm::word_t *, set_operation op=bm::set_OR, bool exit_on_one=false) |
Obsolete! Deserialize bvector using buffer as set operation argument. More... | |
void | deserialize_range (bvector_type &bv, const unsigned char *buf, bm::word_t *, size_type idx_from, size_type idx_to) |
void | set_ref_vectors (const bv_ref_vector_type *ref_vect) |
Attach collection of reference vectors for XOR serialization (no transfer of ownership for the pointer) More... | |
Private Types | |
typedef bvector_type::block_idx_type | block_idx_type |
typedef BV::blocks_manager_type | blocks_manager_type |
typedef serial_stream_iterator< bm::decoder, block_idx_type > | serial_stream_current |
typedef serial_stream_iterator< bm::decoder_big_endian, block_idx_type > | serial_stream_be |
typedef serial_stream_iterator< bm::decoder_little_endian, block_idx_type > | serial_stream_le |
typedef bm::deserializer< BV, bm::decoder_little_endian > | deserializer_le |
typedef bm::deserializer< BV, bm::decoder_big_endian > | deserializer_be |
Private Member Functions | |
size_type | deserialize_xor (bvector_type &bv, const unsigned char *buf, set_operation op, bool exit_on_one) |
void | deserialize_xor_range (bvector_type &bv, const unsigned char *buf, size_type idx_from, size_type idx_to) |
Static Private Member Functions | |
static size_type | deserialize_xor (bvector_type &bv, bvector_type &bv_tmp, set_operation op) |
Private Attributes | |
allocator_type | alloc_ |
bm::word_t * | temp_block_ |
bm::iterator_deserializer< BV, serial_stream_current > | it_d_ |
default stream iterator (same endian) More... | |
bm::iterator_deserializer< BV, serial_stream_be > | it_d_be_ |
big-endian stream iterator More... | |
bm::iterator_deserializer< BV, serial_stream_le > | it_d_le_ |
little-endian stream iterator More... | |
deserializer< BV, bm::decoder > | de_ |
deserializer_le | de_le_ |
deserializer_be | de_be_ |
bvector_type | bv_tmp_ |
const bv_ref_vector_type * | ref_vect_ |
xor ref.vector More... | |
Deserializer, performs logical operations between bit-vector and serialized bit-vector.
This utility class potentially provides faster and/or more memory efficient operation than more conventional deserialization into memory bvector and then logical operation
Definition at line 926 of file bmserial.h.
typedef BV::allocator_type bm::operation_deserializer< BV >::allocator_type |
Definition at line 930 of file bmserial.h.
|
private |
Definition at line 1028 of file bmserial.h.
|
private |
Definition at line 1030 of file bmserial.h.
typedef bm::bv_ref_vector<BV> bm::operation_deserializer< BV >::bv_ref_vector_type |
Definition at line 932 of file bmserial.h.
typedef BV bm::operation_deserializer< BV >::bvector_type |
Definition at line 929 of file bmserial.h.
|
private |
Definition at line 1040 of file bmserial.h.
|
private |
Definition at line 1038 of file bmserial.h.
|
private |
Definition at line 1034 of file bmserial.h.
|
private |
Definition at line 1032 of file bmserial.h.
|
private |
Definition at line 1036 of file bmserial.h.
typedef bvector_type::size_type bm::operation_deserializer< BV >::size_type |
Definition at line 931 of file bmserial.h.
bm::operation_deserializer< BV >::operation_deserializer |
Definition at line 6375 of file bmserial.h.
References bm::operation_deserializer< BV >::alloc_, and bm::operation_deserializer< BV >::temp_block_.
bm::operation_deserializer< BV >::~operation_deserializer |
Definition at line 6383 of file bmserial.h.
|
inline |
Obsolete! Deserialize bvector using buffer as set operation argument.
bv | - target bvector |
buf | - serialized buffer as a logical argument |
op | - set algebra operation (default: OR) |
exit_on_one | - quick exit if set operation found some result |
Definition at line 982 of file bmserial.h.
operation_deserializer< BV >::size_type bm::operation_deserializer< BV >::deserialize | ( | bvector_type & | bv, |
const unsigned char * | buf, | ||
set_operation | op, | ||
bool | exit_on_one = false |
||
) |
Deserialize bvector using buffer as set operation argument.
bv | - target bvector |
buf | - serialized buffer used as as a logical operation argument |
op | - set algebra operation (default: OR) |
exit_on_one | - quick exit if set operation found some result |
Definition at line 6581 of file bmserial.h.
References bm::BigEndian, BM_ASSERT, bm::BM_GAP, bm::BM_HM_HXOR, bm::BM_HM_NO_BO, bm::BM_HM_SPARSE, buf, bm::globals< T >::byte_order(), count, bm::decoder_base::get_8(), bm::LittleEndian, bm::process_operation(), bm::set_ASSIGN, and bm::set_OR.
Referenced by CQueryFunction_BV_Base< BV >::ArgToRes(), CheckRangeDeserial(), CBDB_BvSplitDictStore< Key, Dictionary, BvStore, BV >::Deserialize(), DesrializationTest2(), CQueryFunction_BV_In_Or< BV >::Evaluate(), GroupByTest(), CBDB_ExtBlobStore< TBV >::Open(), CQueryFunction_BV_Base< BV >::ProcessArgVector(), CBDB_BvStore< TBV >::ReadVector(), CLinkReduce< TBV, TMapFunc1, TMapFunc2 >::Remap(), SerializationCompressionLevelsTest(), SerializationOperation(), SerializationTest(), SparseSerializationTest(), and StressTest().
|
inline |
Deserialize range using mask vector (AND)
bv | - target bvector (should be set ranged) |
buf | - serialized buffer pointer |
idx_from | - range of bits set for deserialization [from..to] |
idx_to | - range of bits [from..to] |
Definition at line 996 of file bmserial.h.
void bm::operation_deserializer< BV >::deserialize_range | ( | bvector_type & | bv, |
const unsigned char * | buf, | ||
size_type | idx_from, | ||
size_type | idx_to | ||
) |
Deserialize range using mask vector (AND)
bv | - target bvector (should be set ranged) |
buf | - serialized buffer pointer |
idx_from | - range of bits set for deserialization [from..to] |
idx_to | - range of bits [from..to] |
Definition at line 6661 of file bmserial.h.
References bm::BigEndian, BM_ASSERT, bm::BM_GAP, bm::BM_HM_HXOR, bm::BM_HM_NO_BO, bm::BM_HM_SPARSE, buf, bm::globals< T >::byte_order(), bm::decoder_base::get_8(), bm::LittleEndian, and bm::set_AND.
Referenced by CheckRangeDeserial(), SerializationCompressionLevelsTest(), and SerializationOperation().
|
staticprivate |
Definition at line 6525 of file bmserial.h.
References BM_ASSERT, count, bm::count_and(), bm::count_or(), bm::count_sub(), bm::count_xor(), bm::set_AND, bm::set_ASSIGN, bm::set_COUNT, bm::set_COUNT_A, bm::set_COUNT_AND, bm::set_COUNT_B, bm::set_COUNT_OR, bm::set_COUNT_SUB_AB, bm::set_COUNT_SUB_BA, bm::set_COUNT_XOR, bm::set_END, bm::set_SUB, and bm::set_XOR.
|
private |
Definition at line 6453 of file bmserial.h.
References buf, bm::deserialize(), and bm::set_OR.
|
private |
Definition at line 6469 of file bmserial.h.
References bm::BigEndian, BM_ASSERT, bm::BM_HM_NO_BO, buf, bm::globals< T >::byte_order(), bm::deserializer< BV, DEC >::deserialize(), bm::decoder_base::get_8(), bm::LittleEndian, bm::deserializer< BV, DEC >::set_range(), and bm::deserializer< BV, DEC >::set_ref_vectors().
|
inline |
Attach collection of reference vectors for XOR serialization (no transfer of ownership for the pointer)
Definition at line 1009 of file bmserial.h.
Referenced by SerializationCompressionLevelsTest().
|
private |
Definition at line 1043 of file bmserial.h.
Referenced by bm::operation_deserializer< BV >::operation_deserializer().
|
private |
Definition at line 1057 of file bmserial.h.
|
private |
Definition at line 1053 of file bmserial.h.
|
private |
Definition at line 1055 of file bmserial.h.
|
private |
Definition at line 1054 of file bmserial.h.
|
private |
default stream iterator (same endian)
Definition at line 1047 of file bmserial.h.
|
private |
big-endian stream iterator
Definition at line 1049 of file bmserial.h.
|
private |
little-endian stream iterator
Definition at line 1051 of file bmserial.h.
|
private |
xor ref.vector
Definition at line 1062 of file bmserial.h.
|
private |
Definition at line 1044 of file bmserial.h.
Referenced by bm::operation_deserializer< BV >::operation_deserializer().