Turi Create
4.0
|
#include <core/storage/sframe_data/sarray_file_format_v2.hpp>
Public Member Functions | |
sarray_format_reader_v2 () | |
Default Constructor. | |
~sarray_format_reader_v2 () | |
sarray_format_reader_v2 (const sarray_format_reader_v2 &other)=delete | |
deleted copy constructor | |
sarray_format_reader_v2 & | operator= (const sarray_format_reader_v2 &other)=delete |
deleted assignment | |
void | open (index_file_information index) |
void | open (std::string sidx_file) |
void | close () |
size_t | num_segments () const |
size_t | segment_size (size_t segmentid) const |
const index_file_information & | get_index_info () const |
std::string | get_index_file () const |
size_t | read_rows (size_t row_start, size_t row_end, std::vector< T > &out_obj) |
This class implements the version 2 file format. See the sarray_v2_block_manager for format details.
Definition at line 44 of file sarray_file_format_v2.hpp.
|
inline |
Destructor. Also closes the sarray if open.
Definition at line 54 of file sarray_file_format_v2.hpp.
|
inlinevirtual |
Closes an sarray file set. No-op if the array is already closed.
Implements turi::sarray_format_reader_common_base< T >.
Definition at line 118 of file sarray_file_format_v2.hpp.
|
inlinevirtual |
Returns the index_file of the array (the argument in open)
Implements turi::sarray_format_reader_common_base< T >.
Definition at line 152 of file sarray_file_format_v2.hpp.
|
inlinevirtual |
Gets the contents of the index file information read from the index file
Implements turi::sarray_format_reader_common_base< T >.
Definition at line 145 of file sarray_file_format_v2.hpp.
|
inlinevirtual |
Return the number of segments in the sarray
Implements turi::sarray_format_reader_common_base< T >.
Definition at line 130 of file sarray_file_format_v2.hpp.
|
inlinevirtual |
Open has to be called before any of the other functions are called. Throws a string exception if it is unable to open the index file, or if there is a format error in the sarray index file.
Will throw an exception if a file set is already open.
Implements turi::sarray_format_reader_common_base< T >.
Definition at line 72 of file sarray_file_format_v2.hpp.
|
inlinevirtual |
Opens a single sidx file
Implements turi::sarray_format_reader_common_base< T >.
Definition at line 112 of file sarray_file_format_v2.hpp.
|
inlinevirtual |
Reads a collection of rows, storing the result in out_obj. This function is independent of the open_segment/read_segment/close_segment functions, and can be called anytime. This function is also fully concurrent.
row_start | First row to read |
row_end | one past the last row to read (i.e. EXCLUSIVE). row_end can be beyond the end of the array, in which case, fewer rows will be read. |
out_obj | The output array |
Implements turi::sarray_format_reader_common_base< T >.
Definition at line 176 of file sarray_file_format_v2.hpp.
|
inlinevirtual |
Returns the number of elements in a given segment.
Implements turi::sarray_format_reader_common_base< T >.
Definition at line 137 of file sarray_file_format_v2.hpp.