mxnet
Public Member Functions | List of all members
dmlc::RecordIOChunkReader Class Reference

reader of binary recordio from Blob returned by InputSplit This class divides the blob into several independent parts specified by caller, and read from one segment. The part reading can be used together with InputSplit::NextChunk for multi-threaded parsing(each thread take a RecordIOChunkReader) More...

#include <recordio.h>

Collaboration diagram for dmlc::RecordIOChunkReader:
Collaboration graph

Public Member Functions

 RecordIOChunkReader (InputSplit::Blob chunk, unsigned part_index=0, unsigned num_parts=1)
 constructor More...
 
bool NextRecord (InputSplit::Blob *out_rec)
 read next complete record from stream the blob contains the memory content NOTE: this function is not threadsafe, use one RecordIOChunkReader per thread More...
 

Detailed Description

reader of binary recordio from Blob returned by InputSplit This class divides the blob into several independent parts specified by caller, and read from one segment. The part reading can be used together with InputSplit::NextChunk for multi-threaded parsing(each thread take a RecordIOChunkReader)

See also
RecordIOWriter, InputSplit

Constructor & Destructor Documentation

dmlc::RecordIOChunkReader::RecordIOChunkReader ( InputSplit::Blob  chunk,
unsigned  part_index = 0,
unsigned  num_parts = 1 
)
explicit

constructor

Parameters
chunksource data returned by InputSplit
part_indexwhich part we want to reado
num_partsnumber of total segments

Member Function Documentation

bool dmlc::RecordIOChunkReader::NextRecord ( InputSplit::Blob out_rec)

read next complete record from stream the blob contains the memory content NOTE: this function is not threadsafe, use one RecordIOChunkReader per thread

Parameters
out_recused to store output blob, the header is already removed and out_rec only contains the memory content
Returns
true of read was successful, false if end was reached

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