Rate this Page

Template Class ChunkDataReader#

Page Contents

Class Documentation#

template<typename ExampleType_, typename ChunkType_ = std::vector<ExampleType_>>
class ChunkDataReader#

Interface for chunk reader, which performs data chunking and reading of entire chunks.

A chunk could be an entire file, such as an audio data file or an image, or part of a file in the case of a large text-file split based on seek positions.

Public Types

using ChunkType = ChunkType_#
using ExampleType = ExampleType_#

Public Functions

virtual ~ChunkDataReader() = default#
virtual ChunkType read_chunk(size_t chunk_index) = 0#

Read an entire chunk.

virtual size_t chunk_count() = 0#

Returns the number of chunks available in this reader.

virtual void reset() = 0#

This will clear any internal state associate with this reader.