LCOV - code coverage report
Current view: top level - legacy/ascend950/unified_platform/ccu/ccu_representation/reps - ccu_rep_arg.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 10 10
Test Date: 2026-08-04 10:52:23 Functions: 100.0 % 4 4

            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 HCCL_CCU_REPRESENTATION_ARG_H
      12              : #define HCCL_CCU_REPRESENTATION_ARG_H
      13              : 
      14              : #include <vector>
      15              : #include <memory>
      16              : 
      17              : #include "ccu_datatype.h"
      18              : 
      19              : namespace Hccl {
      20              : namespace CcuRep {
      21              : 
      22              : enum class CcuArgType {
      23              :     VARIABLE,
      24              :     MEMORY,
      25              :     VARIABLE_LIST,
      26              :     MEMORY_LIST,
      27              : };
      28              :  
      29              : struct CcuRepArg {
      30          164 :     explicit CcuRepArg(const Variable &var) : type(CcuArgType::VARIABLE), var(var)
      31              :     {
      32          164 :     }
      33           95 :     explicit CcuRepArg(const Memory &mem) : type(CcuArgType::MEMORY), mem(mem)
      34              :     {
      35           95 :     }
      36            1 :     explicit CcuRepArg(const std::vector<Variable> &varList)
      37            1 :         : type(CcuArgType::VARIABLE_LIST), varList(varList)
      38              :     {
      39            1 :     }
      40           75 :     explicit CcuRepArg(const std::vector<Memory> &memList)
      41           75 :         : type(CcuArgType::MEMORY_LIST), memList(memList)
      42              :     {
      43           75 :     }
      44              :  
      45              :     CcuArgType            type;
      46              :     Variable              var;
      47              :     Memory                mem;
      48              :     std::vector<Variable> varList;
      49              :     std::vector<Memory>   memList;
      50              : };
      51              : 
      52              : }; // namespace CcuRep
      53              : }; // namespace Hccl
      54              : #endif // HCCL_CCU_REPRESENTATION_ARG_H
        

Generated by: LCOV version 2.0-1