BitMagic-C++
|
#include <bmsparsevec_serial.h>
Public Types | |
typedef SV::bvector_type | bvector_type |
typedef bvector_type * | bvector_type_ptr |
typedef SV::value_type | value_type |
typedef SV::size_type | size_type |
typedef bvector_type::allocator_type::allocator_pool_type | allocator_pool_type |
Public Member Functions | |
sparse_vector_serializer () | |
void | serialize (const SV &sv, sparse_vector_serial_layout< SV > &sv_layout) |
Serialize sparse vector into a memory buffer(s) structure. More... | |
Data Fields | |
const typedef bvector_type * | bvector_type_const_ptr |
Protected Attributes | |
bm::serializer< bvector_type > | bvs_ |
\brief Serialize sparse vector into a memory buffer(s) structure
Serialization format:
| HEADER | BIT-VECTORS ... | REMAP_MATRIX
BYTE+BYTE: Magic-signature 'BM' or 'BC' (c-compressed) BYTE : Byte order ( 0 - Big Endian, 1 - Little Endian) { BYTE : Number of Bit-vector plains (total) (non-zero when < 255 plains) | BYTE: zero - flag of large plain matrix INT64: Nnmber of bit-vector plains } INT64: Vector size INT64: Offset of plain 0 from the header start (value 0 means plain is empty) INT64: Offset of plain 1 from ... INT32: reserved
Based on current bit-vector serialization
Remap Matrix: SubHeader | Matrix BLOB
sub-header: BYTE: 'R' (remapping) or 'N' (no remapping) N - means no other info is saved on the stream INT64: remap matrix size
Definition at line 157 of file bmsparsevec_serial.h.
typedef bvector_type::allocator_type::allocator_pool_type bm::sparse_vector_serializer< SV >::allocator_pool_type |
Definition at line 165 of file bmsparsevec_serial.h.
typedef SV::bvector_type bm::sparse_vector_serializer< SV >::bvector_type |
Definition at line 160 of file bmsparsevec_serial.h.
typedef bvector_type* bm::sparse_vector_serializer< SV >::bvector_type_ptr |
Definition at line 162 of file bmsparsevec_serial.h.
typedef SV::size_type bm::sparse_vector_serializer< SV >::size_type |
Definition at line 164 of file bmsparsevec_serial.h.
typedef SV::value_type bm::sparse_vector_serializer< SV >::value_type |
Definition at line 163 of file bmsparsevec_serial.h.
bm::sparse_vector_serializer< SV >::sparse_vector_serializer |
Definition at line 480 of file bmsparsevec_serial.h.
void bm::sparse_vector_serializer< SV >::serialize | ( | const SV & | sv, |
sparse_vector_serial_layout< SV > & | sv_layout | ||
) |
Serialize sparse vector into a memory buffer(s) structure.
sv | - sparse vector to serialize |
sv_layout | - buffer structure to keep the result |
temp_block | - temporary buffer (allocate with BM_DECLARE_TEMP_BLOCK(x) for speed) |
bv_serialization_flags | - bit-vector serialization flags as defined in bm::serialization_flags |
Definition at line 488 of file bmsparsevec_serial.h.
References BM_ASSERT, bm::globals< T >::byte_order(), bm::sparse_vector_serial_layout< SV >::capacity(), bm::sparse_vector_serial_layout< SV >::get_plain(), bm::encoder::memcpy(), bm::encoder::put_64(), bm::encoder::put_8(), bm::sparse_vector_serial_layout< SV >::reserve(), bm::sparse_vector_serial_layout< SV >::resize(), bm::sparse_vector_serial_layout< SV >::set_plain(), and bm::encoder::size().
Referenced by bm::sparse_vector_serialize().
const typedef bvector_type* bm::sparse_vector_serializer< SV >::bvector_type_const_ptr |
Definition at line 161 of file bmsparsevec_serial.h.
|
protected |
Definition at line 185 of file bmsparsevec_serial.h.