forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
store_ops.h
55 lines (40 loc) · 1.04 KB
/
store_ops.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include "store_handler.h"
#include <caffe2/core/operator.h>
namespace caffe2 {
class StoreSetOp final : public Operator<CPUContext> {
public:
StoreSetOp(const OperatorDef& operator_def, Workspace* ws);
bool RunOnDevice() override;
private:
std::string blobName_;
INPUT_TAGS(HANDLER, DATA);
};
class StoreGetOp final : public Operator<CPUContext> {
public:
StoreGetOp(const OperatorDef& operator_def, Workspace* ws);
bool RunOnDevice() override;
private:
std::string blobName_;
INPUT_TAGS(HANDLER);
OUTPUT_TAGS(DATA);
};
class StoreAddOp final : public Operator<CPUContext> {
public:
StoreAddOp(const OperatorDef& operator_def, Workspace* ws);
bool RunOnDevice() override;
private:
std::string blobName_;
int addValue_;
INPUT_TAGS(HANDLER);
OUTPUT_TAGS(VALUE);
};
class StoreWaitOp final : public Operator<CPUContext> {
public:
StoreWaitOp(const OperatorDef& operator_def, Workspace* ws);
bool RunOnDevice() override;
private:
std::vector<std::string> blobNames_;
INPUT_TAGS(HANDLER);
};
}