Context interface.
More...
#include <ndarray.h>
mxnet::cpp::Context::Context |
( |
const DeviceType & |
type, |
|
|
int |
id |
|
) |
| |
|
inline |
Context constructor.
- Parameters
-
type | type of the device |
id | id of the device |
static Context mxnet::cpp::Context::cpu |
( |
int |
device_id = 0 | ) |
|
|
inlinestatic |
Return a CPU context.
- Parameters
-
device_id | id of the device. this is not needed by CPU |
- Returns
- the corresponding CPU context
int mxnet::cpp::Context::GetDeviceId |
( |
| ) |
const |
|
inline |
- Returns
- the id of the device
DeviceType mxnet::cpp::Context::GetDeviceType |
( |
| ) |
const |
|
inline |
- Returns
- the type of the device
static Context mxnet::cpp::Context::gpu |
( |
int |
device_id = 0 | ) |
|
|
inlinestatic |
Return a GPU context.
- Parameters
-
device_id | id of the device |
- Returns
- the corresponding GPU context
The documentation for this class was generated from the following file: