Dragon - C++ API
A Computation Graph Virtual Machine Based Deep Learning Framework
square_op.h
Go to the documentation of this file.
1 
13 #ifndef DRAGON_OPERATORS_ARITHMETIC_SQUARE_OP_H_
14 #define DRAGON_OPERATORS_ARITHMETIC_SQUARE_OP_H_
15 
16 #include "core/operator.h"
17 
18 namespace dragon {
19 
20 template <class Context>
21 class SquareOp final : public Operator<Context> {
22  public:
25 
26  void RunOnDevice() override;
27  template <typename T> void RunImpl();
28 };
29 
30 template <class Context>
31 class SquareGradientOp final : public Operator<Context> {
32  public:
35 
36  void RunOnDevice() override;
37  template <typename T> void RunImpl();
38 };
39 
40 } // namespace dragon
41 
42 #endif // DRAGON_OPERATORS_ARITHMETIC_SQUARE_OP_H_
SIMPLE_CTOR_DTOR(SquareGradientOp)
USE_OPERATOR_FUNCTIONS
Definition: square_op.h:24
void RunOnDevice() override
Implement the detailed execution.
Definition: square_op.cc:14
void RunImpl()
Definition: square_op.cc:7
void RunOnDevice() override
Implement the detailed execution.
Definition: square_op.cc:33
USE_OPERATOR_FUNCTIONS
Definition: square_op.h:34
Definition: operator.h:149
Definition: square_op.h:31
Definition: square_op.h:21
SIMPLE_CTOR_DTOR(SquareOp)
Definition: common.h:41
void RunImpl()
Definition: square_op.cc:24