LCOV - code coverage report
Current view: top level - legacy/ascend910/platform/task - task_logic_info.cc (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 44 44
Test Date: 2026-08-25 19:18:03 Functions: 100.0 % 6 6

            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              : #include "task_logic_info.h"
      12              : 
      13              : namespace hccl {
      14            1 : TaskLogicInfo::TaskLogicInfo(u32 index, TaskLogicType taskLogicType, TaskLogicFuncType funcType)
      15            1 :     : taskLogicCmd{taskLogicType, index},
      16            1 :       taskFuncType(funcType)
      17            1 : {}
      18              : 
      19            1 : TaskLogicInfo::TaskLogicInfo(
      20            1 :     u32 index, TaskLogicType taskLogicType, TaskLogicFuncType funcType, std::vector<TxMemoryInfo>& txMems)
      21            1 :     : taskLogicCmd{taskLogicType, index},
      22            1 :       taskFuncType(funcType),
      23            1 :       txAsync{txMems}
      24            1 : {}
      25              : 
      26            1 : TaskLogicInfo::TaskLogicInfo(
      27            1 :     u32 index, TaskLogicType taskLogicType, TaskLogicFuncType funcType, std::vector<RxMemoryInfo>& rxMems)
      28            1 :     : taskLogicCmd{taskLogicType, index},
      29            1 :       taskFuncType(funcType),
      30            1 :       rxAsync{rxMems}
      31            1 : {}
      32              : 
      33            1 : TaskLogicInfo::TaskLogicInfo(
      34              :     u32 index, TaskLogicType taskLogicType, TaskLogicFuncType funcType, void* signal, u32 userRank, u32 remoteUserRank,
      35            1 :     s32 stage)
      36            1 :     : taskLogicCmd{taskLogicType, index},
      37            1 :       taskFuncType(funcType)
      38              : {
      39            1 :     taskLogicPara.dispatcherTaskLogicPara.signalWait.signal = signal;
      40            1 :     taskLogicPara.dispatcherTaskLogicPara.signalWait.userRank = userRank;
      41            1 :     taskLogicPara.dispatcherTaskLogicPara.signalWait.remoteRank = remoteUserRank;
      42            1 :     taskLogicPara.dispatcherTaskLogicPara.signalWait.stage = stage;
      43            1 : }
      44              : 
      45            1 : TaskLogicInfo::TaskLogicInfo(
      46              :     u32 index, TaskLogicType taskLogicType, TaskLogicFuncType funcType, void* signal, u32 userRank, u64 offset,
      47            1 :     s32 stage)
      48            1 :     : taskLogicCmd{taskLogicType, index},
      49            1 :       taskFuncType(funcType)
      50              : {
      51            1 :     taskLogicPara.dispatcherTaskLogicPara.signalRecord.signal = signal;
      52            1 :     taskLogicPara.dispatcherTaskLogicPara.signalRecord.userRank = userRank;
      53            1 :     taskLogicPara.dispatcherTaskLogicPara.signalRecord.offset = offset;
      54            1 :     taskLogicPara.dispatcherTaskLogicPara.signalRecord.stage = stage;
      55            1 : }
      56              : 
      57            1 : TaskLogicInfo::TaskLogicInfo(
      58              :     u32 index, TaskLogicType taskLogicType, TaskLogicFuncType funcType, void* dst, uint64_t destMax, void* src,
      59            1 :     u64 count, HcclRtMemcpyKind kind)
      60            1 :     : taskLogicCmd{taskLogicType, index},
      61            1 :       taskFuncType(funcType)
      62              : {
      63            1 :     taskLogicPara.dispatcherTaskLogicPara.memAsync.dst = dst;
      64            1 :     taskLogicPara.dispatcherTaskLogicPara.memAsync.destMax = destMax;
      65            1 :     taskLogicPara.dispatcherTaskLogicPara.memAsync.src = src;
      66            1 :     taskLogicPara.dispatcherTaskLogicPara.memAsync.count = count;
      67            1 :     taskLogicPara.dispatcherTaskLogicPara.memAsync.kind = kind;
      68            1 : }
      69              : } // namespace hccl
        

Generated by: LCOV version 2.0-1