Line data Source code
1 : /** 2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd. 3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of 4 : * CANN Open Software License Agreement Version 2.0 (the "License"). 5 : * Please refer to the License for details. You may not use this file except in compliance with the License. 6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, 7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. 8 : * See LICENSE in the root of the software repository for the full text of the License. 9 : */ 10 : 11 : #ifndef ACL_DUMP_H_ 12 : #define ACL_DUMP_H_ 13 : 14 : #include <string> 15 : #include <vector> 16 : #include "acl/acl_base.h" 17 : #include "common/log_inner.h" 18 : 19 : namespace acl { 20 : class AclDump { 21 : public: 22 : static aclError HandleDumpConfig(const char_t *const configPath); 23 : static AclDump &GetInstance(); 24 29 : void SetAdxInitFromAclInitFlag(const bool flag) 25 : { 26 29 : adxInitFromAclInitFlag_ = flag; 27 29 : } 28 26 : bool GetAdxInitFromAclInitFlag() const 29 : { 30 26 : return adxInitFromAclInitFlag_; 31 : } 32 : 33 : private: 34 : static aclError HandleDumpCommand(const char *configStr, size_t size, const char *configPath); 35 : bool adxInitFromAclInitFlag_ = false; 36 : ~AclDump() = default; 37 : AclDump() = default; 38 : }; 39 : } 40 : 41 : #endif // ACL_DUMP_H_