1 #ifndef CAFFE2_OPERATORS_CONV_OP_SHARED_H_ 2 #define CAFFE2_OPERATORS_CONV_OP_SHARED_H_ 4 #include "caffe2/core/context.h" 5 #include "caffe2/core/tensor.h" 6 #include "caffe2/core/workspace.h" 14 template <
typename Context>
21 template <
typename Context>
25 #endif // CAFFE2_OPERATORS_CONV_OP_SHARED_H_ A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
void runWithSharedBuffer(Workspace *ws, std::function< void(Tensor *buffer)> f)
Thread-safe, can be invoked from RunOnDevice() to serialize access to shared buffer.
void createSharedBuffer(Workspace *ws)
Creates a mutex and shared buffer in the workspace.