Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions
at::BaseContext Class Referenceabstract

Virtual interface for the Context class in Caffe2. More...

#include <context_base.h>

Inheritance diagram for at::BaseContext:
caffe2::CPUContext caffe2::CUDAContext caffe2::IDEEPContext

Public Member Functions

virtual Device device () const =0
 
virtual DeviceType device_type () const =0
 
virtual void SwitchToDevice (int)=0
 
void SwitchToDevice ()
 
virtual void WaitEvent (const caffe2::Event &ev)=0
 
virtual void Record (caffe2::Event *ev, const char *err_msg=nullptr) const =0
 
virtual void FinishDeviceComputation ()=0
 
virtual void CopyBytesSameDevice (size_t nbytes, const void *src, void *dst)=0
 
virtual void CopyBytesFromCPU (size_t nbytes, const void *src, void *dst)=0
 
virtual void CopyBytesToCPU (size_t nbytes, const void *src, void *dst)=0
 
template<typename T >
void CopySameDevice (size_t n, const T *src, T *dst)
 
template<typename T >
void CopyFromCPU (size_t n, const T *src, T *dst)
 
template<typename T >
void CopyToCPU (size_t n, const T *src, T *dst)
 
virtual bool SupportsNonFundamentalTypes () const
 
void EnforceMetaCopyOK ()
 
void CopyItemsSameDevice (const caffe2::TypeMeta &meta, size_t n, const void *src, void *dst)
 
void CopyItemsFromCPU (const caffe2::TypeMeta &meta, size_t n, const void *src, void *dst)
 
void CopyItemsToCPU (const caffe2::TypeMeta &meta, size_t n, const void *src, void *dst)
 

Detailed Description

Virtual interface for the Context class in Caffe2.

A Context defines all the necessities to run an operator on a specific device. Specific Context classes needs to implement all the pure virtual functions in the BaseContext class. TODO: add docs after this is finalized.

Definition at line 32 of file context_base.h.


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