Turi Create
4.0
|
#include <core/storage/sframe_data/sarray_v2_encoded_block.hpp>
Public Member Functions | |
encoded_block () | |
Default constructor. Does nothing. | |
encoded_block (const encoded_block &)=default | |
Default Copy constructor. | |
encoded_block (encoded_block &&)=default | |
Default Move constructor. | |
encoded_block & | operator= (const encoded_block &)=default |
Default Copy assignment. | |
encoded_block & | operator= (encoded_block &&)=default |
Default Move assignment. | |
encoded_block (block_info info, std::vector< char > &&data) | |
block constructor from data contents; simply calls init(). | |
encoded_block (block_info info, std::shared_ptr< std::vector< char > > data) | |
block constructor from data contents; simply calls init(). | |
void | init (block_info info, std::vector< char > &&data) |
void | init (block_info info, std::shared_ptr< std::vector< char > > data) |
encoded_block_range | get_range () |
void | release () |
This class provides accessors into a typed v2 sarray<flexible_type> encoded column block. It maintains the block in a compressed state, and stream decodes it.
The encoded block object is copyable, move constructable, copy assignable, move assignable. Copies are cheap and free as it only needs to copy a single shared pointer.
Definition at line 40 of file sarray_v2_encoded_block.hpp.
encoded_block_range turi::v2_block_impl::encoded_block::get_range | ( | ) |
Returns an accessor to the contents of the block.
The range is not concurrent. But independent ranges can be accessed in parallel safely.
void turi::v2_block_impl::encoded_block::init | ( | block_info | info, |
std::vector< char > && | data | ||
) |
Initializes this block to point to new data.
Existing ranges are NOT invalidated. They will continue to point to what they used to point to.
info | The block information structure |
data | The binary data |
void turi::v2_block_impl::encoded_block::init | ( | block_info | info, |
std::shared_ptr< std::vector< char > > | data | ||
) |
Initializes this block to point to new data.
Existing ranges are NOT invalidated. They will continue to point to what they used to point to.
info | The block information structure |
data | The binary data |
void turi::v2_block_impl::encoded_block::release | ( | ) |
Release the block object. All acquired ranges are stil valid.