mxnet
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
MXContext Struct Reference

Context info passing from MXNet OpContext dev_type is string repr of supported context, currently only "cpu" and "gpu" dev_id is the device index where the tensor locates. More...

#include <lib_api.h>

Collaboration diagram for MXContext:
Collaboration graph

Public Member Functions

 MXContext ()
 
 MXContext (std::string dev_type_, int dev_id_)
 
 MXContext (const char *dev_type_, int dev_id_)
 

Static Public Member Functions

static MXContext CPU ()
 
static MXContext GPU ()
 
static MXContext CPU (int dev_id)
 
static MXContext GPU (int dev_id)
 

Public Attributes

std::string dev_type
 
int dev_id
 

Detailed Description

Context info passing from MXNet OpContext dev_type is string repr of supported context, currently only "cpu" and "gpu" dev_id is the device index where the tensor locates.

Constructor & Destructor Documentation

MXContext::MXContext ( )
inline
MXContext::MXContext ( std::string  dev_type_,
int  dev_id_ 
)
inlineexplicit
MXContext::MXContext ( const char *  dev_type_,
int  dev_id_ 
)
inlineexplicit

Member Function Documentation

static MXContext MXContext::CPU ( )
inlinestatic
static MXContext MXContext::CPU ( int  dev_id)
inlinestatic
static MXContext MXContext::GPU ( )
inlinestatic
static MXContext MXContext::GPU ( int  dev_id)
inlinestatic

Member Data Documentation

int MXContext::dev_id
std::string MXContext::dev_type

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