mxnet
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
storage.h
Go to the documentation of this file.
1 
6 #ifndef MXNET_STORAGE_H_
7 #define MXNET_STORAGE_H_
8 
9 #include <memory>
10 #include "./base.h"
11 
12 namespace mxnet {
13 
18  public:
22  struct Handle {
26  void* dptr;
30  size_t size;
35  };
42  virtual Handle Alloc(size_t size, Context ctx) = 0;
47  virtual void Free(Handle handle) = 0;
51  virtual ~Storage() {}
55  static Storage* Get();
64  static std::shared_ptr<Storage> _GetSharedRef();
65 }; // class Storage
66 } // namespace mxnet
67 #endif // MXNET_STORAGE_H_
Storage manager across multiple devices.
Definition: storage.h:17
virtual ~Storage()
Destructor.
Definition: storage.h:51
void * dptr
Pointer to the data.
Definition: storage.h:26
Context ctx
Context information about device and ID.
Definition: storage.h:34
#define MXNET_API
define compatible keywords in g++ Used to support g++-4.6 and g++4.7
Definition: base.h:62
Storage handle.
Definition: storage.h:22
configuation of mxnet as well as basic data structure.
size_t size
Size of the storage.
Definition: storage.h:30
Context information about the execution enviroment.
Definition: base.h:90