From db4d2a9540b13be94318b9422914c506c5427996 Mon Sep 17 00:00:00 2001 From: wuweikang Date: Tue, 3 Nov 2020 09:18:52 +0800 Subject: [PATCH] clangformat modification --- src/ge/common/model_saver.h | 4 ++-- src/ge/graph/passes/identity_pass.h | 1 + src/ge/graph/passes/transpose_transdata_pass.h | 2 +- src/ge/omm/csa_interact.h | 25 ++++++------------------- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/ge/common/model_saver.h b/src/ge/common/model_saver.h index 411d5e35..4c4fcdf1 100644 --- a/src/ge/common/model_saver.h +++ b/src/ge/common/model_saver.h @@ -22,8 +22,8 @@ #include "framework/common/types.h" /** -* Provide read and write operations for offline model files -*/ + * Provide read and write operations for offline model files + */ namespace ge { using Json = nlohmann::json; diff --git a/src/ge/graph/passes/identity_pass.h b/src/ge/graph/passes/identity_pass.h index a4a80efc..21d990d5 100644 --- a/src/ge/graph/passes/identity_pass.h +++ b/src/ge/graph/passes/identity_pass.h @@ -25,6 +25,7 @@ class IdentityPass : public BaseNodePass { explicit IdentityPass(bool force) : force_(force) {} ~IdentityPass() override = default; Status Run(NodePtr &node) override; + private: bool force_ = false; }; diff --git a/src/ge/graph/passes/transpose_transdata_pass.h b/src/ge/graph/passes/transpose_transdata_pass.h index bf42f5de..6b65e960 100644 --- a/src/ge/graph/passes/transpose_transdata_pass.h +++ b/src/ge/graph/passes/transpose_transdata_pass.h @@ -23,6 +23,7 @@ namespace ge { class TransposeTransDataPass : public BaseNodePass { public: Status Run(NodePtr &node) override; + private: Status CheckOneInAndOneOutDataAnchor(NodePtr &node) const; Status RemoveTranspose(NodePtr &node); @@ -32,4 +33,3 @@ class TransposeTransDataPass : public BaseNodePass { }; } // namespace ge #endif // GE_GRAPH_PASSES_TRANSPOSE_TRANSDATA_PASS_H_ - diff --git a/src/ge/omm/csa_interact.h b/src/ge/omm/csa_interact.h index 0a609e09..b135d8e6 100644 --- a/src/ge/omm/csa_interact.h +++ b/src/ge/omm/csa_interact.h @@ -56,10 +56,7 @@ enum ErrorModule { }; struct CsaErrorCode { - CsaErrorCode() - : module_ret_errcode(0), - error_module(ERROR_MODULE_FMK), - job_sub_state(JOBSUBSTATE_OTHER) {} + CsaErrorCode() : module_ret_errcode(0), error_module(ERROR_MODULE_FMK), job_sub_state(JOBSUBSTATE_OTHER) {} ~CsaErrorCode() {} uint32_t module_ret_errcode; ErrorModule error_module; @@ -89,10 +86,8 @@ class CsaInteract { /// @param [in] error_module error module identified by FMK /// @return Status /// - Status WriteJobState(JobState job_state, - JobSubState job_sub_state = JOBSUBSTATE_OTHER, - uint32_t module_ret_errcode = SUCCESS, - ErrorModule error_module = ERROR_MODULE_FMK); + Status WriteJobState(JobState job_state, JobSubState job_sub_state = JOBSUBSTATE_OTHER, + uint32_t module_ret_errcode = SUCCESS, ErrorModule error_module = ERROR_MODULE_FMK); /// /// @brief Update error code in the job state file @@ -101,8 +96,7 @@ class CsaInteract { /// @param [in] job_sub_state detailed job state /// @return void /// - void WriteErrorCode(uint32_t module_ret_errcode, ErrorModule error_module, - JobSubState job_sub_state); + void WriteErrorCode(uint32_t module_ret_errcode, ErrorModule error_module, JobSubState job_sub_state); /// /// @brief Record errors that occurred durning the training @@ -111,9 +105,7 @@ class CsaInteract { /// @param [in] job_sub_state detailed job state /// @return void /// - void StoreInternalErrorCode(uint32_t module_ret_errcode, - ErrorModule error_module, - JobSubState job_sub_state); + void StoreInternalErrorCode(uint32_t module_ret_errcode, ErrorModule error_module, JobSubState job_sub_state); /// /// @brief Update training error code in the job state file @@ -130,11 +122,7 @@ class CsaInteract { private: CsaInteract() - : dev_index_(0), - job_id_(0), - is_init_(false), - curr_state_(JOBSTATE_UNKOWN), - is_have_internal_error_(false) {} + : dev_index_(0), job_id_(0), is_init_(false), curr_state_(JOBSTATE_UNKOWN), is_have_internal_error_(false) {} ~CsaInteract() {} @@ -180,4 +168,3 @@ class CsaInteract { } // namespace ge #endif // GE_OMM_CSA_INTERACT_H_ -