LCOV - code coverage report
Current view: top level - legacy/ascend950/framework/dfx/common - mc2_global_mirror_tasks.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 2 2
Test Date: 2026-08-18 17:47:01 Functions: 100.0 % 2 2

            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 MC2_GLOBAL_MIRROR_TASKS_H
      12              : #define MC2_GLOBAL_MIRROR_TASKS_H
      13              : 
      14              : #include <array>
      15              : #include <vector>
      16              : #include <memory>
      17              : #include "dfx_common.h"
      18              : #include "task_info.h"
      19              : 
      20              : namespace Hccl {
      21              : 
      22              : class MC2GlobalMirrorTasks {
      23              : public:
      24              :     static MC2GlobalMirrorTasks& GetInstance();
      25              : 
      26              :     void Clear();
      27              :     void AddTaskInfo(u32 devLogicId, std::shared_ptr<TaskInfo> taskInfo);
      28              :     std::shared_ptr<TaskInfo> GetTaskInfo(u32 devLogicId, u8 dieId, u8 missionId, u32 instrId) const;
      29              : 
      30              : private:
      31            1 :     MC2GlobalMirrorTasks() = default;
      32            1 :     ~MC2GlobalMirrorTasks() = default;
      33              :     MC2GlobalMirrorTasks(const MC2GlobalMirrorTasks&) = delete;
      34              :     MC2GlobalMirrorTasks& operator=(const MC2GlobalMirrorTasks&) = delete;
      35              : 
      36              : private:
      37              :     std::array<std::vector<std::shared_ptr<TaskInfo>>, DEVICE_MAX_NUM> taskQueues_;
      38              : };
      39              : 
      40              : } // namespace Hccl
      41              : 
      42              : #endif // MC2_GLOBAL_MIRROR_TASKS_H
        

Generated by: LCOV version 2.0-1