mxnet
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mxnet::ext::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 mxnet::ext::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() [1/3]

mxnet::ext::MXContext::MXContext ( )

◆ MXContext() [2/3]

mxnet::ext::MXContext::MXContext ( std::string  dev_type_,
int  dev_id_ 
)
explicit

◆ MXContext() [3/3]

mxnet::ext::MXContext::MXContext ( const char *  dev_type_,
int  dev_id_ 
)
explicit

Member Function Documentation

◆ CPU() [1/2]

static MXContext mxnet::ext::MXContext::CPU ( )
static

◆ CPU() [2/2]

static MXContext mxnet::ext::MXContext::CPU ( int  dev_id)
static

◆ GPU() [1/2]

static MXContext mxnet::ext::MXContext::GPU ( )
static

◆ GPU() [2/2]

static MXContext mxnet::ext::MXContext::GPU ( int  dev_id)
static

Member Data Documentation

◆ dev_id

int mxnet::ext::MXContext::dev_id

◆ dev_type

std::string mxnet::ext::MXContext::dev_type

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