已合并
【质量加固】修复若干符合编码规范规则和提交代码规范的问题 #4497
Fiee创建于 8月21日
【质量加固】修复若干符合编码规范规则和提交代码规范的问题 #4497
已合并
共 5 个文件变更+11-8
| @@ -1180,7 +1180,7 @@ Status ModelHelper::GetOppVersion(std::string &version) { | |||
| 1180 | return SUCCESS; | 1180 | return SUCCESS; |
| 1181 | } | 1181 | } |
| 1182 | 1182 | ||
| 1183 | -Status ModelHelper::CheckOsCpuInfoAndOppVersion() { | 1183 | +Status ModelHelper::CheckOsCpuInfoAndOppVersion() const { |
| 1184 | if (file_header_->need_check_os_cpu_info == static_cast<uint8_t>(OsCpuInfoCheckTyep::NEED_CHECK)) { | 1184 | if (file_header_->need_check_os_cpu_info == static_cast<uint8_t>(OsCpuInfoCheckTyep::NEED_CHECK)) { |
| 1185 | std::string host_env_os; | 1185 | std::string host_env_os; |
| 1186 | std::string host_env_cpu; | 1186 | std::string host_env_cpu; |
| @@ -16,6 +16,9 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | + | ||
| 20 | + | ||
| 21 | + | ||
| 19 | 22 | ||
| 20 | 23 | ||
| 21 | 24 | ||
| @@ -107,7 +107,7 @@ class GE_FUNC_VISIBILITY ModelHelper : public ModelSaveHelper { | |||
| 107 | const uint32_t vector_core_cnt_ini, fe::PlatformInfo &platform_info, | 107 | const uint32_t vector_core_cnt_ini, fe::PlatformInfo &platform_info, |
| 108 | int32_t &virtual_type) const; | 108 | int32_t &virtual_type) const; |
| 109 | 109 | ||
| 110 | - Status CheckOsCpuInfoAndOppVersion(); | 110 | + Status CheckOsCpuInfoAndOppVersion() const; |
| 111 | 111 | ||
| 112 | Status GetSoBinData(const string &cpu_info, const string &os_info); | 112 | Status GetSoBinData(const string &cpu_info, const string &os_info); |
| 113 | 113 | ||
| @@ -169,15 +169,15 @@ const uint32_t *DfxExtendInfo::GetTaskTypeAddr() const { | |||
| 169 | return reinterpret_cast<const uint32_t *>(&place_holder_ + sizeof(uint32_t)); | 169 | return reinterpret_cast<const uint32_t *>(&place_holder_ + sizeof(uint32_t)); |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | -const uint32_t *DfxExtendInfo::GetCtxTypeAddr() { | 172 | +const uint32_t *DfxExtendInfo::GetCtxTypeAddr() const { |
| 173 | return reinterpret_cast<const uint32_t *>(&place_holder_ + kCtxTypeAddrOffset * sizeof(uint32_t)); | 173 | return reinterpret_cast<const uint32_t *>(&place_holder_ + kCtxTypeAddrOffset * sizeof(uint32_t)); |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | -const uint32_t *DfxExtendInfo::GetCtxSizeAddr() { | 176 | +const uint32_t *DfxExtendInfo::GetCtxSizeAddr() const { |
| 177 | return reinterpret_cast<const uint32_t *>(&place_holder_ + kCtxSizeAddrOffset * sizeof(uint32_t)); | 177 | return reinterpret_cast<const uint32_t *>(&place_holder_ + kCtxSizeAddrOffset * sizeof(uint32_t)); |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | -const uint32_t *DfxExtendInfo::GetCtxIdAddr(size_t index) { | 180 | +const uint32_t *DfxExtendInfo::GetCtxIdAddr(size_t index) const { |
| 181 | if (*(GetCtxSizeAddr()) == 0U) { | 181 | if (*(GetCtxSizeAddr()) == 0U) { |
| 182 | return nullptr; | 182 | return nullptr; |
| 183 | } | 183 | } |
| @@ -38,9 +38,9 @@ class DfxExtendInfo { | |||
| 38 | const std::vector<uint32_t> ctx_id_vec); | 38 | const std::vector<uint32_t> ctx_id_vec); |
| 39 | const uint32_t *GetOpImplModeAddr() const; | 39 | const uint32_t *GetOpImplModeAddr() const; |
| 40 | const uint32_t *GetTaskTypeAddr() const; | 40 | const uint32_t *GetTaskTypeAddr() const; |
| 41 | - const uint32_t *GetCtxTypeAddr(); | 41 | + const uint32_t *GetCtxTypeAddr() const; |
| 42 | - const uint32_t *GetCtxSizeAddr(); | 42 | + const uint32_t *GetCtxSizeAddr() const; |
| 43 | - const uint32_t *GetCtxIdAddr(size_t index); | 43 | + const uint32_t *GetCtxIdAddr(size_t index) const; |
| 44 | const uint32_t *GetPreCmoCtxSizeAddr(); | 44 | const uint32_t *GetPreCmoCtxSizeAddr(); |
| 45 | const uint32_t *GetPreCmoCtxTypeAddr(); | 45 | const uint32_t *GetPreCmoCtxTypeAddr(); |
| 46 | const uint32_t *GetPreCmoCtxIdAddr(size_t index); | 46 | const uint32_t *GetPreCmoCtxIdAddr(size_t index); |