LCOV - code coverage report
Current view: top level - base_comm/resources/ccu/ccu_representation/reps/data - ccu_rep_bufreduce_v1.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 80.0 % 10 8
Test Date: 2026-07-28 12:11:00 Functions: 80.0 % 10 8

            Line data    Source code
       1              : /*
       2              :  * Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
       3              :  * Description: ccu representation base header file
       4              :  * Create: 2025-02-18
       5              :  */
       6              : 
       7              : #ifndef HCOMM_CCU_REPRESENTATION_BUFREDUCE_H
       8              : #define HCOMM_CCU_REPRESENTATION_BUFREDUCE_H
       9              : 
      10              : #include <vector>
      11              : 
      12              : #include "ccu_rep_base_v1.h"
      13              : #include "ccu_datatype_v1.h"
      14              : 
      15              : namespace hcomm {
      16              : namespace CcuRep {
      17              : 
      18              : class CcuRepBufReduce : public CcuRepBase {
      19              : public:
      20              :     CcuRepBufReduce(CcuInsGeneraterBase* insGenPtr, const std::vector<CcuBuf> &mem, uint16_t count, uint16_t dataType, uint16_t outputDataType,
      21              :                     uint16_t opType, CompletedEvent sem, const CcuRep::Variable &len, uint16_t mask = 1);
      22              :     bool        Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &instrId, const TransDep &dep) override;
      23              :     std::string Describe() override;
      24           10 :     const std::vector<CcuBuf>& GetMem() { return mem; }
      25           17 :     uint16_t GetCount() { return count; }
      26            6 :     uint16_t GetDataType() { return dataType; }
      27            6 :     uint16_t GetOutputDataType() { return outputDataType; }
      28            8 :     uint16_t GetOpType() { return opType; }
      29            0 :     uint16_t GetXnLengthId() { return xnIdLength_.Id(); }
      30            6 :     uint16_t GetMask() { return mask; }
      31            0 :     uint16_t GetSemId() { return sem.Id(); }
      32              : 
      33            5 :     CompletedEvent GetSem() { return sem; }
      34            5 :     CcuRep::Variable GetXnIdLength() { return xnIdLength_; }
      35              : 
      36              : private:
      37              :     CcuInsGeneraterBase*   insGenPtr;
      38              :     std::vector<CcuBuf>    mem;
      39              :     uint16_t               count;
      40              :     uint16_t               dataType;
      41              :     uint16_t               outputDataType;
      42              :     uint16_t               opType;
      43              :     CompletedEvent         sem;
      44              :     CcuRep::Variable       xnIdLength_;
      45              : 
      46              :     uint16_t               mask{0};
      47              : };
      48              : 
      49              : };     // namespace CcuRep
      50              : };     // namespace hcomm
      51              : #endif // HCOMM_CCU_REPRESENTATION_BUFREDUCE_H
        

Generated by: LCOV version 2.0-1