Caffe2 - C++ API
A deep learning, cross platform ML framework
conv_op_shared.h
1 #ifndef CAFFE2_OPERATORS_CONV_OP_SHARED_H_
2 #define CAFFE2_OPERATORS_CONV_OP_SHARED_H_
3 
4 #include "caffe2/core/context.h"
5 #include "caffe2/core/tensor.h"
6 #include "caffe2/core/workspace.h"
7 
8 namespace caffe2 {
9 
14 template <typename Context>
15 void createSharedBuffer(Workspace* ws);
16 
21 template <typename Context>
22 void runWithSharedBuffer(Workspace* ws, std::function<void(Tensor* buffer)> f);
23 } // namespace caffe2
24 
25 #endif // CAFFE2_OPERATORS_CONV_OP_SHARED_H_
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13
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.