TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
nmtSample::LimitedSamplesDataReader Class Reference

wraps another data reader and limits the number of samples to read More...

Inheritance diagram for nmtSample::LimitedSamplesDataReader:
Collaboration diagram for nmtSample::LimitedSamplesDataReader:

Public Types

typedef std::shared_ptr< DataReaderptr
 

Public Member Functions

 LimitedSamplesDataReader (int maxSamplesToRead, DataReader::ptr originalDataReader)
 
int read (int samplesToRead, int maxInputSequenceLength, int *hInputData, int *hActualInputSequenceLengths) override
 reads the batch of smaples/sequences More...
 
void reset () override
 Reset the reader position, the data reader is ready to read the data from th ebeginning again after the function returns. More...
 
std::string getInfo () override
 get the textual description of the component More...
 

Private Attributes

int gMaxSamplesToRead
 
DataReader::ptr gOriginalDataReader
 
int gCurrentPosition
 

Detailed Description

wraps another data reader and limits the number of samples to read

Member Typedef Documentation

◆ ptr

typedef std::shared_ptr<DataReader> nmtSample::DataReader::ptr
inherited

Constructor & Destructor Documentation

◆ LimitedSamplesDataReader()

nmtSample::LimitedSamplesDataReader::LimitedSamplesDataReader ( int  maxSamplesToRead,
DataReader::ptr  originalDataReader 
)

Member Function Documentation

◆ read()

int nmtSample::LimitedSamplesDataReader::read ( int  samplesToRead,
int  maxInputSequenceLength,
int hInputData,
int hActualInputSequenceLengths 
)
overridevirtual

reads the batch of smaples/sequences

Returns
the actual number of samples read

Implements nmtSample::DataReader.

◆ reset()

void nmtSample::LimitedSamplesDataReader::reset ( )
overridevirtual

Reset the reader position, the data reader is ready to read the data from th ebeginning again after the function returns.

Implements nmtSample::DataReader.

◆ getInfo()

std::string nmtSample::LimitedSamplesDataReader::getInfo ( )
overridevirtual

get the textual description of the component

Implements nmtSample::Component.

Member Data Documentation

◆ gMaxSamplesToRead

int nmtSample::LimitedSamplesDataReader::gMaxSamplesToRead
private

◆ gOriginalDataReader

DataReader::ptr nmtSample::LimitedSamplesDataReader::gOriginalDataReader
private

◆ gCurrentPosition

int nmtSample::LimitedSamplesDataReader::gCurrentPosition
private

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