Apache SINGA
A distributed deep learning platform .
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | List of all members
mshadow::utils::IStream Class Referenceabstract

interface of stream I/O, used to serialize data, it is not restricted to only this interface in SaveBinary/LoadBinary mshadow accept all class that implements Read and Write More...

#include <tensor_io.h>

Inheritance diagram for mshadow::utils::IStream:
mshadow::utils::FileStream

Public Member Functions

virtual size_t Read (void *ptr, size_t size)=0
 read data from stream More...
 
virtual void Write (const void *ptr, size_t size)=0
 write data to stream More...
 
virtual ~IStream (void)
 virtual destructor
 

Detailed Description

interface of stream I/O, used to serialize data, it is not restricted to only this interface in SaveBinary/LoadBinary mshadow accept all class that implements Read and Write

Member Function Documentation

virtual size_t mshadow::utils::IStream::Read ( void *  ptr,
size_t  size 
)
pure virtual

read data from stream

Parameters
ptrpointer to memory buffer
sizesize of block
Returns
usually is the size of data readed

Implemented in mshadow::utils::FileStream.

virtual void mshadow::utils::IStream::Write ( const void *  ptr,
size_t  size 
)
pure virtual

write data to stream

Parameters
ptrpointer to memory buffer
sizesize of block

Implemented in mshadow::utils::FileStream.


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