Turi Create  4.0
turi::v2_block_impl::encoded_block Class Reference

#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_blockoperator= (const encoded_block &)=default
 Default Copy assignment.
 
encoded_blockoperator= (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 ()
 

Detailed Description

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.

Member Function Documentation

◆ get_range()

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.

◆ init() [1/2]

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.

Parameters
infoThe block information structure
dataThe binary data

◆ init() [2/2]

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.

Parameters
infoThe block information structure
dataThe binary data

◆ release()

void turi::v2_block_impl::encoded_block::release ( )

Release the block object. All acquired ranges are stil valid.


The documentation for this class was generated from the following file: