提交 a0d77533 编写于 作者: Y Yu Yang

Rename Ctor -> Constructor

Make code more clearer
上级 3e52343d
......@@ -274,7 +274,7 @@ class OpKernelRegistrar : public Registrar {
class _OpClass_##op_type##_ : public op_class { \
public: \
DEFINE_OP_CLONE_METHOD(_OpClass_##op_type##_); \
DEFINE_OP_CTOR(_OpClass_##op_type##_, op_class); \
DEFINE_OP_CONSTRUCTOR(_OpClass_##op_type##_, op_class); \
}; \
static ::paddle::framework::OpRegistrar<_OpClass_##op_type##_, \
op_maker_class> \
......@@ -294,7 +294,7 @@ class OpKernelRegistrar : public Registrar {
class _OpGradClass_##op_type##_ : public grad_op_class { \
public: \
DEFINE_OP_CLONE_METHOD(_OpGradClass_##op_type##_); \
DEFINE_OP_CTOR(_OpGradClass_##op_type##_, grad_op_class); \
DEFINE_OP_CONSTRUCTOR(_OpGradClass_##op_type##_, grad_op_class); \
}; \
static ::paddle::framework::GradOpRegistrar<_OpGradClass_##op_type##_> \
__op_gradient_registrar_##op_type##_##grad_op_type##__(#op_type, \
......
......@@ -118,7 +118,7 @@ class OperatorBase {
public:
std::string type_;
// NOTE: in case of OpGrad, inputs_ contains:
// I (Inputs)
// I (Inputs)opear
// O (Outputs)
// OG (Output Gradients)
VarNameMap inputs_;
......@@ -139,7 +139,7 @@ class OperatorBase {
// You can also use
// using PARENT_CLASS::PARENT_CLASS;
// to use parent's constructor.
#define DEFINE_OP_CTOR(CLS, PARENT_CLS) \
#define DEFINE_OP_CONSTRUCTOR(CLS, PARENT_CLS) \
CLS(const std::string& type, const VarNameMap& inputs, \
const VarNameMap& outputs, const paddle::framework::AttributeMap& attrs) \
: PARENT_CLS(type, inputs, outputs, attrs) {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册