From 2c34f34338d8c3a1a781be6e2822077320543f4d Mon Sep 17 00:00:00 2001 From: dolphin8 Date: Thu, 28 Jun 2018 12:02:08 +0000 Subject: [PATCH] fix clang-format --- src/common/log.h | 45 ++++++++++--------- src/common/type_define.h | 2 +- src/framework/attribute.h | 2 +- src/framework/ddim.h | 2 +- .../program/program-optimize/node.cpp | 2 +- .../program-optimize/program_optimize.cpp | 2 +- src/framework/scope.cpp | 2 +- src/io/io.cpp | 2 +- src/operators/kernel/arm/batchnorm_kernel.cpp | 1 - .../kernel/mali/batchnorm_kernel.cpp | 1 - src/operators/kernel/prior_box_kernel.h | 4 +- 11 files changed, 33 insertions(+), 32 deletions(-) diff --git a/src/common/log.h b/src/common/log.h index 4257147635..a3cefe2541 100644 --- a/src/common/log.h +++ b/src/common/log.h @@ -16,9 +16,9 @@ limitations under the License. */ #include #ifdef PADDLE_MOBILE_DEBUG +#include #include #include -#include #include #endif #ifdef ANDROID @@ -116,26 +116,29 @@ struct ToLog { Print printer_; }; -#define LOG(level) \ - if (level > paddle_mobile::log_level) { \ - } else \ - paddle_mobile::ToLog( \ - level, \ - static_cast(std::stringstream() \ - << "[file: " \ - << (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1) : __FILE__) \ - << "] [line: " << __LINE__ << "] ") \ - .str()) - -#define DLOG \ - if (paddle_mobile::kLOG_DEBUG > paddle_mobile::log_level) { \ - } else \ - paddle_mobile::ToLog( \ - paddle_mobile::kLOG_DEBUG, \ - static_cast(std::stringstream() \ - << "[file: " \ - << (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1) : __FILE__) \ - << "] [line: " << __LINE__ << "] ") \ +#define LOG(level) \ + if (level > paddle_mobile::log_level) { \ + } else \ + paddle_mobile::ToLog( \ + level, static_cast( \ + std::stringstream() \ + << "[file: " \ + << (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1) \ + : __FILE__) \ + << "] [line: " << __LINE__ << "] ") \ + .str()) + +#define DLOG \ + if (paddle_mobile::kLOG_DEBUG > paddle_mobile::log_level) { \ + } else \ + paddle_mobile::ToLog( \ + paddle_mobile::kLOG_DEBUG, \ + static_cast( \ + std::stringstream() \ + << "[file: " \ + << (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1) \ + : __FILE__) \ + << "] [line: " << __LINE__ << "] ") \ .str()) #define LOGF(level, format, ...) \ diff --git a/src/common/type_define.h b/src/common/type_define.h index 269c58d769..389f9a715f 100644 --- a/src/common/type_define.h +++ b/src/common/type_define.h @@ -14,10 +14,10 @@ limitations under the License. */ #pragma once +#include #include #include #include -#include #include "framework/attribute.h" #include "framework/scope.h" diff --git a/src/framework/attribute.h b/src/framework/attribute.h index 30cf6a1d0c..478fc1b3f5 100644 --- a/src/framework/attribute.h +++ b/src/framework/attribute.h @@ -15,9 +15,9 @@ limitations under the License. */ #pragma once #include +#include #include #include -#include #include "common/enforce.h" #include "common/log.h" diff --git a/src/framework/ddim.h b/src/framework/ddim.h index dea6c9d45b..ff94c24ada 100644 --- a/src/framework/ddim.h +++ b/src/framework/ddim.h @@ -15,8 +15,8 @@ limitations under the License. */ #pragma once #include -#include #include +#include #include "common/enforce.h" #include "common/variant.h" #include "dim.h" diff --git a/src/framework/program/program-optimize/node.cpp b/src/framework/program/program-optimize/node.cpp index d84033b936..89385e12d9 100644 --- a/src/framework/program/program-optimize/node.cpp +++ b/src/framework/program/program-optimize/node.cpp @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "framework/program/program-optimize/node.h" -#include "framework/operator.h" #include +#include "framework/operator.h" namespace paddle_mobile { diff --git a/src/framework/program/program-optimize/program_optimize.cpp b/src/framework/program/program-optimize/program_optimize.cpp index 223421c23c..3619bc79f5 100644 --- a/src/framework/program/program-optimize/program_optimize.cpp +++ b/src/framework/program/program-optimize/program_optimize.cpp @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "framework/program/program-optimize/program_optimize.h" -#include "framework/program/program-optimize/fusion_op_register.h" #include +#include "framework/program/program-optimize/fusion_op_register.h" namespace paddle_mobile { diff --git a/src/framework/scope.cpp b/src/framework/scope.cpp index 7324cf9a2e..a1f5789aa5 100644 --- a/src/framework/scope.cpp +++ b/src/framework/scope.cpp @@ -14,10 +14,10 @@ limitations under the License. */ #include "framework/scope.h" +#include #include #include #include -#include namespace paddle_mobile { namespace framework { diff --git a/src/io/io.cpp b/src/io/io.cpp index 1d7a582be4..8b1577b0ee 100644 --- a/src/io/io.cpp +++ b/src/io/io.cpp @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "io/io.h" +#include #include #include "common/enforce.h" #include "common/log.h" @@ -24,7 +25,6 @@ limitations under the License. */ #include "framework/program/var_desc.h" #include "framework/scope.h" #include "framework/tensor.h" -#include #ifdef PADDLE_EXECUTOR_MULTITHREAD #include #include diff --git a/src/operators/kernel/arm/batchnorm_kernel.cpp b/src/operators/kernel/arm/batchnorm_kernel.cpp index 0f0ee95670..02a7973ef7 100644 --- a/src/operators/kernel/arm/batchnorm_kernel.cpp +++ b/src/operators/kernel/arm/batchnorm_kernel.cpp @@ -14,7 +14,6 @@ limitations under the License. */ #ifdef BATCHNORM_OP - #include "operators/kernel/batchnorm_kernel.h" #include diff --git a/src/operators/kernel/mali/batchnorm_kernel.cpp b/src/operators/kernel/mali/batchnorm_kernel.cpp index c816855f02..35c54807a9 100644 --- a/src/operators/kernel/mali/batchnorm_kernel.cpp +++ b/src/operators/kernel/mali/batchnorm_kernel.cpp @@ -14,7 +14,6 @@ limitations under the License. */ #ifdef BATCHNORM_OP - #include "operators/kernel/batchnorm_kernel.h" namespace paddle_mobile { diff --git a/src/operators/kernel/prior_box_kernel.h b/src/operators/kernel/prior_box_kernel.h index fec6c92c5c..79fc630b8e 100644 --- a/src/operators/kernel/prior_box_kernel.h +++ b/src/operators/kernel/prior_box_kernel.h @@ -16,9 +16,9 @@ limitations under the License. */ #pragma once -#include -#include #include +#include +#include #include "framework/operator.h" #include "operators/math/transform.h" #include "operators/op_param.h" -- GitLab