diff --git a/src/framework/operator.h b/src/framework/operator.h index 07d2c62790ca0ed4bd07efbe06b9b9f4ccbf4fe0..c85a38d73c620ae4b08387b548bd2f4f8ca71711 100644 --- a/src/framework/operator.h +++ b/src/framework/operator.h @@ -111,9 +111,7 @@ class OperatorWithKernel : public OperatorBase { const VariableNameMap &outputs, const AttributeMap &attrs, std::shared_ptr scope) : OperatorBase(type, inputs, outputs, attrs, scope), - param_(inputs, outputs, attrs, *scope) { - - } + param_(inputs, outputs, attrs, *scope) {} virtual void RunImpl() const { this->kernel_.Compute(this->param_); } diff --git a/src/io/io.cpp b/src/io/io.cpp index 5fee3145373bf1c080ec5efc0da4fcd121d937a1..c7f8f174ac825463f66fd50b72e0c58d50bd537e 100644 --- a/src/io/io.cpp +++ b/src/io/io.cpp @@ -200,9 +200,9 @@ Executor::Executor(const framework::Program p, int batch_size, } std::shared_ptr to_predict_block = - to_predict_program_->Block(0); + to_predict_program_->Block(0); auto &ops = ops_of_block_[*to_predict_block.get()]; - for (const auto &op: ops) { + for (const auto &op : ops) { op->Init(); } } diff --git a/src/operators/kernel/arm/box_coder_kernel.cpp b/src/operators/kernel/arm/box_coder_kernel.cpp index 7c2f1713f21f179778b4a6b7e6722ce1ed9164e3..02ec85a444c380ba76d64b0d15d35ce27b9eaf44 100644 --- a/src/operators/kernel/arm/box_coder_kernel.cpp +++ b/src/operators/kernel/arm/box_coder_kernel.cpp @@ -110,7 +110,7 @@ void DecodeCenterSize(const framework::Tensor& target_box, } template <> -bool BoxCoderKernel::Init(const BoxCoderParam ¶) const { +bool BoxCoderKernel::Init(const BoxCoderParam& para) const { return true; } diff --git a/src/operators/kernel/arm/conv_add_relu_kernel.cpp b/src/operators/kernel/arm/conv_add_relu_kernel.cpp index f77c1c1946fbf7becf77235513335d4beeabfbef..2df48222e0923e403f2ad44b3d5c4a89aceb4cc4 100644 --- a/src/operators/kernel/arm/conv_add_relu_kernel.cpp +++ b/src/operators/kernel/arm/conv_add_relu_kernel.cpp @@ -20,7 +20,8 @@ namespace paddle_mobile { namespace operators { template <> -bool ConvAddReluKernel::Init(const FusionConvAddReluParam ¶) const { +bool ConvAddReluKernel::Init( + const FusionConvAddReluParam ¶) const { return true; } diff --git a/src/operators/kernel/arm/elementwise_add_kernel.cpp b/src/operators/kernel/arm/elementwise_add_kernel.cpp index c5fb3349a922a3967a7f69a5fcf4550b10aceb34..2f5e26a37e4f2c1d370805ee7b565a60f4748b0a 100644 --- a/src/operators/kernel/arm/elementwise_add_kernel.cpp +++ b/src/operators/kernel/arm/elementwise_add_kernel.cpp @@ -27,7 +27,8 @@ struct AddFunctor { }; template <> -bool ElementwiseAddKernel::Init(const ElementwiseAddParam ¶) const { +bool ElementwiseAddKernel::Init( + const ElementwiseAddParam ¶) const { return true; } diff --git a/src/operators/kernel/arm/multiclass_nms_kernel.cpp b/src/operators/kernel/arm/multiclass_nms_kernel.cpp index d0e1f9c8707f70cee502ae3ed84fa71b7cfd6df1..58f224ab536173fff46bb1739b27590382fbab6d 100644 --- a/src/operators/kernel/arm/multiclass_nms_kernel.cpp +++ b/src/operators/kernel/arm/multiclass_nms_kernel.cpp @@ -206,7 +206,8 @@ void MultiClassOutput(const Tensor& scores, const Tensor& bboxes, } template <> -bool MultiClassNMSKernel::Init(const MultiClassNMSParam ¶) const { +bool MultiClassNMSKernel::Init( + const MultiClassNMSParam& para) const { return true; } diff --git a/src/operators/kernel/arm/transpose_kernel.cpp b/src/operators/kernel/arm/transpose_kernel.cpp index 73953a83dc3fd443dff71a9701523730d8f0c574..a44ff22a2f228cc357c066a01e142de7cc4f2083 100644 --- a/src/operators/kernel/arm/transpose_kernel.cpp +++ b/src/operators/kernel/arm/transpose_kernel.cpp @@ -35,7 +35,7 @@ namespace operators { // } template <> -bool TransposeKernel::Init(const TransposeParam ¶) const { +bool TransposeKernel::Init(const TransposeParam& para) const { return true; } diff --git a/src/operators/kernel/box_coder_kernel.h b/src/operators/kernel/box_coder_kernel.h index 983039018c5d964c61a4560b341e3bf9b28e9a36..4c4206f52b3ffc5e60983bf1d6adb25292d01ac4 100644 --- a/src/operators/kernel/box_coder_kernel.h +++ b/src/operators/kernel/box_coder_kernel.h @@ -30,7 +30,7 @@ class BoxCoderKernel : public framework::OpKernelBase { public: void Compute(const BoxCoderParam& param) const; - bool Init(const BoxCoderParam ¶) const; + bool Init(const BoxCoderParam& para) const; }; } // namespace operators } // namespace paddle_mobile diff --git a/src/operators/kernel/fusion_fc_kernel.h b/src/operators/kernel/fusion_fc_kernel.h index e6279fd405b61850bec5b09d3e6f919e8727463c..c4e2b30176fb904d7fb906c5efc5137a5dcb8d59 100644 --- a/src/operators/kernel/fusion_fc_kernel.h +++ b/src/operators/kernel/fusion_fc_kernel.h @@ -28,7 +28,7 @@ class FusionFcKernel : public framework::OpKernelBase { public: void Compute(const FusionFcParam& param) const; - bool Init(const FusionFcParam ¶) const; + bool Init(const FusionFcParam& para) const; }; } // namespace operators } // namespace paddle_mobile diff --git a/src/operators/kernel/multiclass_nms_kernel.h b/src/operators/kernel/multiclass_nms_kernel.h index bf9294a60785ef6ebd2055a97aeaede8a1cb9ab3..ca86604f2c6e550c219e54b6533c1500fb2912c4 100644 --- a/src/operators/kernel/multiclass_nms_kernel.h +++ b/src/operators/kernel/multiclass_nms_kernel.h @@ -28,7 +28,7 @@ class MultiClassNMSKernel : public framework::OpKernelBase { public: void Compute(const MultiClassNMSParam& param) const; - bool Init(const MultiClassNMSParam ¶) const; + bool Init(const MultiClassNMSParam& para) const; }; } // namespace operators } // namespace paddle_mobile diff --git a/src/operators/kernel/prior_box_kernel.h b/src/operators/kernel/prior_box_kernel.h index aba410fa3e1508b1622aa3446d85518fd7d4262e..be13f0fc16c0c0c0b16117a46b80a9f9acdeffae 100644 --- a/src/operators/kernel/prior_box_kernel.h +++ b/src/operators/kernel/prior_box_kernel.h @@ -54,7 +54,7 @@ class PriorBoxKernel : public framework::OpKernelBase { public: void Compute(const PriorBoxParam& param) const; - bool Init(const PriorBoxParam ¶) const; + bool Init(const PriorBoxParam& para) const; }; } // namespace operators } // namespace paddle_mobile diff --git a/src/operators/kernel/relu_kernel.h b/src/operators/kernel/relu_kernel.h index 6bbc6158a05821ea76783f611eda36da8ab2b812..2155c33811f553435e4a89b5b23533e2bd42db5d 100644 --- a/src/operators/kernel/relu_kernel.h +++ b/src/operators/kernel/relu_kernel.h @@ -27,7 +27,7 @@ template class ReluKernel : public framework::OpKernelBase { public: void Compute(const ReluParam& param) const; - bool Init(const ReluParam ¶) const; + bool Init(const ReluParam& para) const; }; } // namespace operators } // namespace paddle_mobile diff --git a/src/operators/kernel/reshape_kernel.h b/src/operators/kernel/reshape_kernel.h index d217120cdb028758441e28f6896cf4f463ceda4e..364f5b0902c2661017f2e72520849836f64dd0bb 100644 --- a/src/operators/kernel/reshape_kernel.h +++ b/src/operators/kernel/reshape_kernel.h @@ -71,7 +71,7 @@ template class ReshapeKernel : public framework::OpKernelBase { public: void Compute(const ReshapeParam& param) const; - bool Init(const ReshapeParam ¶) const; + bool Init(const ReshapeParam& para) const; }; } // namespace operators } // namespace paddle_mobile diff --git a/src/operators/kernel/sigmoid_kernel.h b/src/operators/kernel/sigmoid_kernel.h index ea9c5b9486cbb22f4fbd78c107bc14edc6f0b988..e9eaae5ad867c6880db7346f9632ff37a92aaf66 100644 --- a/src/operators/kernel/sigmoid_kernel.h +++ b/src/operators/kernel/sigmoid_kernel.h @@ -26,7 +26,7 @@ template class SigmoidKernel : public OpKernelBase { public: void Compute(const SigmoidParam& param) const override; - bool Init(const SigmoidParam ¶) const; + bool Init(const SigmoidParam& para) const; }; } // namespace operators } // namespace paddle_mobile diff --git a/src/operators/kernel/transpose_kernel.h b/src/operators/kernel/transpose_kernel.h index 3c2cd1619d0094ed95118ae38a2b98f91dc84a33..6526d97df9863392f783841a784cb5df4e45f218 100644 --- a/src/operators/kernel/transpose_kernel.h +++ b/src/operators/kernel/transpose_kernel.h @@ -29,7 +29,7 @@ class TransposeKernel : public framework::OpKernelBase { public: void Compute(const TransposeParam& param) const; - bool Init(const TransposeParam ¶) const; + bool Init(const TransposeParam& para) const; }; } // namespace operators } // namespace paddle_mobile