Caffe2 - C++ API
A deep learning, cross platform ML framework
store_ops.h
1 
17 #pragma once
18 
19 #include "store_handler.h"
20 
21 #include <caffe2/core/operator.h>
22 
23 namespace caffe2 {
24 
25 class StoreSetOp final : public Operator<CPUContext> {
26  public:
27  StoreSetOp(const OperatorDef& operator_def, Workspace* ws);
28  bool RunOnDevice() override;
29 
30  private:
31  std::string blobName_;
32 
33  INPUT_TAGS(HANDLER, DATA);
34 };
35 
36 class StoreGetOp final : public Operator<CPUContext> {
37  public:
38  StoreGetOp(const OperatorDef& operator_def, Workspace* ws);
39  bool RunOnDevice() override;
40 
41  private:
42  std::string blobName_;
43 
44  INPUT_TAGS(HANDLER);
45  OUTPUT_TAGS(DATA);
46 };
47 
48 class StoreAddOp final : public Operator<CPUContext> {
49  public:
50  StoreAddOp(const OperatorDef& operator_def, Workspace* ws);
51  bool RunOnDevice() override;
52 
53  private:
54  std::string blobName_;
55  int addValue_;
56 
57  INPUT_TAGS(HANDLER);
58  OUTPUT_TAGS(VALUE);
59 };
60 
61 class StoreWaitOp final : public Operator<CPUContext> {
62  public:
63  StoreWaitOp(const OperatorDef& operator_def, Workspace* ws);
64  bool RunOnDevice() override;
65 
66  private:
67  std::vector<std::string> blobNames_;
68 
69  INPUT_TAGS(HANDLER);
70 };
71 }
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
Definition: workspace.h:63
Copyright (c) 2016-present, Facebook, Inc.