Turi Create
4.0
|
#include <ml/ml_data/data_storage/ml_data_block_manager.hpp>
Public Member Functions | |
ml_data_block_manager (std::shared_ptr< ml_metadata > metadata, const row_metadata &rm, size_t row_block_size, const std::shared_ptr< sarray< ml_data_internal::row_data_block > > &data_blocks, const std::vector< std::shared_ptr< sarray< flexible_type > > > &untranslated_columns) | |
std::shared_ptr< ml_data_block > | get_block (size_t block_index) |
Implements a cache for the row block pool. This is (1) an optimization to make iteration generally faster, especially on small ml_data instances when the blocks are likely to overlap, and (2) needed to enable the use of row references as a way to refer to a part of a block.
Definition at line 37 of file ml_data_block_manager.hpp.
turi::ml_data_internal::ml_data_block_manager::ml_data_block_manager | ( | std::shared_ptr< ml_metadata > | metadata, |
const row_metadata & | rm, | ||
size_t | row_block_size, | ||
const std::shared_ptr< sarray< ml_data_internal::row_data_block > > & | data_blocks, | ||
const std::vector< std::shared_ptr< sarray< flexible_type > > > & | untranslated_columns | ||
) |
Constructor + opens the readers.
std::shared_ptr<ml_data_block> turi::ml_data_internal::ml_data_block_manager::get_block | ( | size_t | block_index | ) |
Returns a block corresponding to the block index. Loads from disk if not in cache.