From a0d77533f01c5da0fa811d4cc91235f5610f745f Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Wed, 16 Aug 2017 14:49:18 +0800 Subject: [PATCH] Rename Ctor -> Constructor Make code more clearer --- paddle/framework/op_registry.h | 4 ++-- paddle/framework/operator.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/framework/op_registry.h b/paddle/framework/op_registry.h index b5b4668074c..c0654b375dd 100644 --- a/paddle/framework/op_registry.h +++ b/paddle/framework/op_registry.h @@ -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, \ diff --git a/paddle/framework/operator.h b/paddle/framework/operator.h index 9e4d0d5e398..4a1dee6fb00 100644 --- a/paddle/framework/operator.h +++ b/paddle/framework/operator.h @@ -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) {} -- GitLab