Storage manager across multiple devices.
More...
#include <storage.h>
|
static Storage * | Get () |
|
static std::shared_ptr< Storage > | _GetSharedRef () |
| Get shared pointer reference to storage 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...
|
|
Storage manager across multiple devices.
virtual mxnet::Storage::~Storage |
( |
| ) |
|
|
inlinevirtual |
static std::shared_ptr<Storage> mxnet::Storage::_GetSharedRef |
( |
| ) |
|
|
static |
Get shared pointer reference to storage 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
-
size | Total size of memory in bytes. |
ctx | Context information about the device and ID. |
- Returns
- Handle struct.
virtual void mxnet::Storage::DirectFree |
( |
Handle |
handle | ) |
|
|
pure virtual |
Free storage directly, without putting it into memory pool. This can synchronization of all previous runned device functions.
This function is suitable for conatiner structure with requirement on upsizing in the beginning phase of the iteration.
- Parameters
-
virtual void mxnet::Storage::Free |
( |
Handle |
handle | ) |
|
|
pure virtual |
static Storage* mxnet::Storage::Get |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following file: