Turi Create  4.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
turi::ml_data_internal::ml_data_block_manager Class Reference

#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_blockget_block (size_t block_index)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ml_data_block_manager()

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.

Member Function Documentation

◆ get_block()

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.


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