LCOV - code coverage report
Current view: top level - base_comm/resources/ccu/ccu_representation/reps/common - ccu_rep_nop.cc (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 12 12
Test Date: 2026-08-04 10:52:23 Functions: 100.0 % 3 3

            Line data    Source code
       1              : /*
       2              :  * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
       3              :  * Description: ccu representation implementation file
       4              :  * Author: sunzhepeng
       5              :  * Create: 2024-06-17
       6              :  */
       7              : 
       8              : #include "ccu_rep_v1.h"
       9              : 
      10              : #include "string_util.h"
      11              : #include "exception_util.h"
      12              : #include "ccu_api_exception.h"
      13              : #include "ccu_ins_generator_base.h"
      14              : #include "ccu_kernel.h"
      15              : 
      16              : namespace hcomm {
      17              : namespace CcuRep {
      18              : 
      19              : using namespace Hccl;
      20              : 
      21          117 : CcuRepNop::CcuRepNop(CcuInsGeneratorBase* insGeneratorPtr) : insGeneratorPtr_(insGeneratorPtr)
      22              : {
      23          117 :     type       = CcuRepType::NOP;
      24          117 :     instrCount = insGeneratorPtr_->GetInstrCount(type);
      25          117 : }
      26              : 
      27           56 : bool CcuRepNop::Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &instrId, const TransDep &dep)
      28              : {
      29           56 :     this->instrId = instrId;
      30           56 :     translated    = true;
      31              : 
      32           56 :     CHK_RET_THROW(Hccl::CcuApiException,
      33              :         Hccl::StringFormat("[CcuRepNop][%s] failed to translate repNop for instrId[%u] ", __func__, instrId),
      34              :             insGeneratorPtr_->CcuRepNopTranslate(ccuKernel, instr, instrId, this, dep));
      35              : 
      36           56 :     instrId += instrCount;
      37              : 
      38           56 :     return translated;
      39              : }
      40              : 
      41            1 : std::string CcuRepNop::Describe()
      42              : {
      43            1 :     return Hccl::StringFormat("Nop");
      44              : }
      45              : 
      46              : }; // namespace CcuRep
      47              : }; // namespace hcomm
        

Generated by: LCOV version 2.0-1