From f04dbebbc3855661ab74b7a6d8f78d0c03213e80 Mon Sep 17 00:00:00 2001 From: liuruilong Date: Wed, 31 Oct 2018 21:54:45 +0800 Subject: [PATCH] format files --- src/operators/fusion_conv_add_add_prelu_op.h | 2 +- src/operators/fusion_conv_add_op.h | 2 +- src/operators/fusion_conv_add_prelu_op.h | 3 +-- src/operators/fusion_conv_bn_add_relu_op.h | 4 ++-- src/operators/fusion_dwconv_bn_relu_op.h | 2 +- src/operators/im2sequence_op.h | 2 +- .../kernel/cl/elementwise_add_kernel.cpp | 21 ++++++++++++------- src/operators/pool_op.cpp | 2 +- 8 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/operators/fusion_conv_add_add_prelu_op.h b/src/operators/fusion_conv_add_add_prelu_op.h index 2bf4c39c5e..4ec76b5008 100644 --- a/src/operators/fusion_conv_add_add_prelu_op.h +++ b/src/operators/fusion_conv_add_add_prelu_op.h @@ -17,8 +17,8 @@ limitations under the License. */ #pragma once #include -#include #include +#include #include "framework/operator.h" #include "framework/program/program-optimize/fusion_op_register.h" #include "operators/kernel/conv_add_add_prelu_kernel.h" diff --git a/src/operators/fusion_conv_add_op.h b/src/operators/fusion_conv_add_op.h index 843a744aca..eef143ce87 100644 --- a/src/operators/fusion_conv_add_op.h +++ b/src/operators/fusion_conv_add_op.h @@ -19,8 +19,8 @@ limitations under the License. */ #include #include "framework/operator.h" #include "framework/program/program-optimize/fusion_op_register.h" -#include "operators/op_param.h" #include "operators/kernel/conv_add_kernel.h" +#include "operators/op_param.h" namespace paddle_mobile { namespace operators { diff --git a/src/operators/fusion_conv_add_prelu_op.h b/src/operators/fusion_conv_add_prelu_op.h index 2139cdec8f..fc1143099e 100644 --- a/src/operators/fusion_conv_add_prelu_op.h +++ b/src/operators/fusion_conv_add_prelu_op.h @@ -39,8 +39,7 @@ class FusionConvAddPReluOpMatcher : public framework::FusionOpMatcher { std::vector> *removed_nodes) { node->Folder(node_.Depth(), Type(), {{G_OP_TYPE_ELEMENTWISE_ADD, {{"Y", "Y"}}}, - {G_OP_TYPE_PRELU, {{"Alpha", "Alpha"}}} - }, + {G_OP_TYPE_PRELU, {{"Alpha", "Alpha"}}}}, removed_nodes); } std::string Type() { return G_OP_TYPE_FUSION_CONV_ADD_PRELU; } diff --git a/src/operators/fusion_conv_bn_add_relu_op.h b/src/operators/fusion_conv_bn_add_relu_op.h index 84d93a3772..303668a89b 100644 --- a/src/operators/fusion_conv_bn_add_relu_op.h +++ b/src/operators/fusion_conv_bn_add_relu_op.h @@ -17,12 +17,12 @@ limitations under the License. */ #pragma once #include -#include #include +#include #include "framework/operator.h" #include "framework/program/program-optimize/fusion_op_register.h" -#include "operators/op_param.h" #include "operators/kernel/conv_bn_add_relu_kernel.h" +#include "operators/op_param.h" namespace paddle_mobile { namespace operators { diff --git a/src/operators/fusion_dwconv_bn_relu_op.h b/src/operators/fusion_dwconv_bn_relu_op.h index 119f57ce04..d7a74d896e 100644 --- a/src/operators/fusion_dwconv_bn_relu_op.h +++ b/src/operators/fusion_dwconv_bn_relu_op.h @@ -20,8 +20,8 @@ limitations under the License. */ #include #include "framework/operator.h" #include "framework/program/program-optimize/fusion_op_register.h" -#include "operators/op_param.h" #include "operators/kernel/dwconv_bn_relu_kernel.h" +#include "operators/op_param.h" namespace paddle_mobile { namespace operators { diff --git a/src/operators/im2sequence_op.h b/src/operators/im2sequence_op.h index a2b34a5eea..036b496ca8 100644 --- a/src/operators/im2sequence_op.h +++ b/src/operators/im2sequence_op.h @@ -17,9 +17,9 @@ limitations under the License. */ #pragma once #include -#include "operators/op_param.h" #include "framework/operator.h" #include "operators/kernel/im2sequence_kernel.h" +#include "operators/op_param.h" namespace paddle_mobile { namespace operators { diff --git a/src/operators/kernel/cl/elementwise_add_kernel.cpp b/src/operators/kernel/cl/elementwise_add_kernel.cpp index 970accc1dc..e62714b3fa 100644 --- a/src/operators/kernel/cl/elementwise_add_kernel.cpp +++ b/src/operators/kernel/cl/elementwise_add_kernel.cpp @@ -49,11 +49,14 @@ void ElementwiseAddKernel::Compute( cl_mem input_image = input->GetCLImage(); cl_mem bias_image = bias->GetCLImage(); cl_mem output_image = output->GetCLImage(); - status = clSetKernelArg(kernel, 0, sizeof(cl_mem), reinterpret_cast(&input_image)); + status = clSetKernelArg(kernel, 0, sizeof(cl_mem), + reinterpret_cast(&input_image)); CL_CHECK_ERRORS(status); - status = clSetKernelArg(kernel, 1, sizeof(cl_mem), reinterpret_cast(&bias_image)); + status = clSetKernelArg(kernel, 1, sizeof(cl_mem), + reinterpret_cast(&bias_image)); CL_CHECK_ERRORS(status); - status = clSetKernelArg(kernel, 2, sizeof(cl_mem), reinterpret_cast(&output_image)); + status = clSetKernelArg(kernel, 2, sizeof(cl_mem), + reinterpret_cast(&output_image)); CL_CHECK_ERRORS(status); int width = input->ImageWidth(); int height = input->ImageHeight(); @@ -67,13 +70,17 @@ void ElementwiseAddKernel::Compute( cl_mem bias_image = bias->GetCLImage(); cl_mem output_image = output->GetCLImage(); int tensor_w = input->dims()[3]; - status = clSetKernelArg(kernel, 0, sizeof(cl_mem), reinterpret_cast(&input_image)); + status = clSetKernelArg(kernel, 0, sizeof(cl_mem), + reinterpret_cast(&input_image)); CL_CHECK_ERRORS(status); - status = clSetKernelArg(kernel, 1, sizeof(cl_mem), reinterpret_cast(&bias_image)); + status = clSetKernelArg(kernel, 1, sizeof(cl_mem), + reinterpret_cast(&bias_image)); CL_CHECK_ERRORS(status); - status = clSetKernelArg(kernel, 2, sizeof(cl_mem), reinterpret_cast(&output_image)); + status = clSetKernelArg(kernel, 2, sizeof(cl_mem), + reinterpret_cast(&output_image)); CL_CHECK_ERRORS(status); - status = clSetKernelArg(kernel, 3, sizeof(cl_int), reinterpret_cast(&tensor_w)); + status = clSetKernelArg(kernel, 3, sizeof(cl_int), + reinterpret_cast(&tensor_w)); CL_CHECK_ERRORS(status); int width = input->ImageWidth(); int height = input->ImageHeight(); diff --git a/src/operators/pool_op.cpp b/src/operators/pool_op.cpp index 1ee75ebea5..241f278ec0 100644 --- a/src/operators/pool_op.cpp +++ b/src/operators/pool_op.cpp @@ -14,8 +14,8 @@ limitations under the License. */ #ifdef POOL_OP -#include #include "operators/pool_op.h" +#include #include "framework/op_proto_maker.h" #include "framework/op_registry.h" -- GitLab