Virtual interface for the Context class in Caffe2. More...
#include <context_base.h>
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) |
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.