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

reads sequences of data from input stream More...

Inheritance diagram for nmtSample::TextReader:
Collaboration diagram for nmtSample::TextReader:

Public Types

typedef std::shared_ptr< DataReaderptr
 

Public Member Functions

 TextReader (std::shared_ptr< std::istream > textInput, Vocabulary::ptr vocabulary)
 
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

std::shared_ptr< std::istream > mInput
 
Vocabulary::ptr mVocabulary
 

Detailed Description

reads sequences of data from input stream

writes sequences of data into output stream

Member Typedef Documentation

◆ ptr

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

Constructor & Destructor Documentation

◆ TextReader()

nmtSample::TextReader::TextReader ( std::shared_ptr< std::istream >  textInput,
Vocabulary::ptr  vocabulary 
)

Member Function Documentation

◆ read()

int nmtSample::TextReader::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::TextReader::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::TextReader::getInfo ( )
overridevirtual

get the textual description of the component

Implements nmtSample::Component.

Member Data Documentation

◆ mInput

std::shared_ptr<std::istream> nmtSample::TextReader::mInput
private

◆ mVocabulary

Vocabulary::ptr nmtSample::TextReader::mVocabulary
private

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