SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
less_op.h
1 #ifndef _OPERATORS_LESS_OP_H_
2 #define _OPERATORS_LESS_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 
18 template <typename Backend>
19 class LessOp : public EltwiseOp<Backend> {
20  public:
21  LessOp(const std::string& name, Workspace* workspace)
22  : EltwiseOp<Backend>(name, OpType::Less, workspace) {}
23 
24  void run() override {
25  assert(false && "Please implement the run() method for this backend!");
26  }
27 };
28 
35 template <typename Backend>
36 class LessEqualOp : public EltwiseOp<Backend> {
37  public:
38  LessEqualOp(const std::string& name, Workspace* workspace)
39  : EltwiseOp<Backend>(name, OpType::LessEqual, workspace) {}
40 
41  void run() override {
42  assert(false && "Please implement the run() method for this backend!");
43  }
44 };
45 
46 REGISTER_SPECIAL_OP(LessOp, ReferenceBackend);
47 REGISTER_SPECIAL_OP(LessEqualOp, ReferenceBackend);
48 
49 } // namespace smaug
50 
51 #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