mxnet
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | Static Public Member Functions | List of all members
mxnet::Storage Class Referenceabstract

Storage manager across multiple devices. More...

#include <storage.h>

Collaboration diagram for mxnet::Storage:
Collaboration graph

Classes

struct  Handle
 Storage handle. More...
 

Public Member Functions

virtual Handle Alloc (size_t size, Context ctx)=0
 Allocate a new contiguous memory for a given size. More...
 
virtual void Free (Handle handle)=0
 Free storage. More...
 
virtual ~Storage ()
 Destructor. More...
 

Static Public Member Functions

static StorageGet ()
 
static std::shared_ptr< Storage_GetSharedRef ()
 Get shared pointer reference to engine singleton. Most user should not call this function. This function is called by another singleton X who requires Storage to be destructed after X. More...
 

Detailed Description

Storage manager across multiple devices.

Constructor & Destructor Documentation

virtual mxnet::Storage::~Storage ( )
inlinevirtual

Destructor.

Member Function Documentation

static std::shared_ptr<Storage> mxnet::Storage::_GetSharedRef ( )
static

Get shared pointer reference to engine singleton. Most user should not call this function. This function is called by another singleton X who requires Storage to be destructed after X.

Returns
A shared pointer to Storage singleton.
virtual Handle mxnet::Storage::Alloc ( size_t  size,
Context  ctx 
)
pure virtual

Allocate a new contiguous memory for a given size.

Parameters
sizeTotal size of memory in bytes.
ctxContext information about the device and ID.
Returns
Handle struct.
virtual void mxnet::Storage::Free ( Handle  handle)
pure virtual

Free storage.

Parameters
handleHandle struect.
static Storage* mxnet::Storage::Get ( )
static
Returns
Storage singleton.

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