SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
greater_op.h
1 #ifndef _OPERATORS_GREATER_OP_H_
2 #define _OPERATORS_GREATER_OP_H_
3 
4 #include "smaug/core/backend.h"
5 #include "smaug/core/operator.h"
7 #include "smaug/core/workspace.h"
8 #include "smaug/operators/eltwise_op.h"
9 
10 namespace smaug {
11 
17 template <typename Backend>
18 class GreaterOp : public EltwiseOp<Backend> {
19  public:
20  GreaterOp(const std::string& name, Workspace* workspace)
21  : EltwiseOp<Backend>(name, OpType::Greater, workspace) {}
22 
23  void run() override {
24  assert(false && "Please implement the run() method for this backend!");
25  }
26 };
27 
33 template <typename Backend>
34 class GreaterEqualOp : public EltwiseOp<Backend> {
35  public:
36  GreaterEqualOp(const std::string& name, Workspace* workspace)
37  : EltwiseOp<Backend>(name, OpType::GreaterEqual, workspace) {}
38 
39  void run() override {
40  assert(false && "Please implement the run() method for this backend!");
41  }
42 };
43 
44 REGISTER_SPECIAL_OP(GreaterOp, ReferenceBackend);
45 REGISTER_SPECIAL_OP(GreaterEqualOp, ReferenceBackend);
46 
47 } // namespace smaug
48 
49 #endif
tensor_utils.h
Utility functions for copying/printing/tiling tensors.
smaug
The smaug namespace is the parent namespace of all C++ code in SMAUG.
Definition: backend.cpp:38