mxnet
Public Member Functions | List of all members
dmlc::DataIter< DType > Class Template Referenceabstract

data iterator interface this is not a C++ style iterator, but nice for data pulling:) This interface is used to pull in the data The system can do some useful tricks for you like pre-fetching from disk and pre-computation. More...

#include <data.h>

Inheritance diagram for dmlc::DataIter< DType >:
Inheritance graph
Collaboration diagram for dmlc::DataIter< DType >:
Collaboration graph

Public Member Functions

virtual ~DataIter (void) DMLC_THROW_EXCEPTION
 destructor More...
 
virtual void BeforeFirst (void)=0
 set before first of the item More...
 
virtual bool Next (void)=0
 move to next item More...
 
virtual const DType & Value (void) const =0
 get current data More...
 

Detailed Description

template<typename DType>
class dmlc::DataIter< DType >

data iterator interface this is not a C++ style iterator, but nice for data pulling:) This interface is used to pull in the data The system can do some useful tricks for you like pre-fetching from disk and pre-computation.

Usage example:

itr->BeforeFirst();
while (itr->Next()) {
const DType &batch = itr->Value();
// some computations
}
Template Parameters
DTypethe data type

Constructor & Destructor Documentation

template<typename DType>
virtual dmlc::DataIter< DType >::~DataIter ( void  )
inlinevirtual

destructor

Member Function Documentation

template<typename DType>
virtual void dmlc::DataIter< DType >::BeforeFirst ( void  )
pure virtual

set before first of the item

Implemented in dmlc::ThreadedIter< DType >, and mxnet::IIterator< DType >.

template<typename DType>
virtual bool dmlc::DataIter< DType >::Next ( void  )
pure virtual

move to next item

Implemented in dmlc::ThreadedIter< DType >, and mxnet::IIterator< DType >.

template<typename DType>
virtual const DType& dmlc::DataIter< DType >::Value ( void  ) const
pure virtual

get current data

Implemented in dmlc::ThreadedIter< DType >, and mxnet::IIterator< DType >.


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