LCOV - code coverage report
Current view: top level - base_comm/resources/ccu/ccu_representation/reps/control - ccu_rep_funcblock_v1.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 71.4 % 7 5
Test Date: 2026-08-04 10:52:23 Functions: 75.0 % 4 3

            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 CCU_REPRESENTATION_FUNC_BLOCK_H
       8              : #define CCU_REPRESENTATION_FUNC_BLOCK_H
       9              : 
      10              : #include "ccu_rep_block_v1.h"
      11              : #include "ccu_rep_arg_v1.h"
      12              : #include "ccu_rep_reference_manager_v1.h"
      13              : 
      14              : namespace hcomm {
      15              : namespace CcuRep {
      16              : 
      17              : class CcuRepFuncBlock : public CcuRepBlock {
      18              : public:
      19              :     explicit CcuRepFuncBlock(CcuInsGeneratorBase* insGenPtr, const std::string &label);
      20              :     bool        Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &instrId, const TransDep &dep) override;
      21              :     std::string Describe() override;
      22              :     uint16_t InstrCount() override;
      23              :  
      24              :     void SetFuncManager(CcuRepReferenceManager *funcManager);
      25              :  
      26              :     void DefineInArg(const Variable &var);
      27              :     void DefineOutArg(const Variable &var);
      28              :     void DefineInArg(const std::vector<Variable> &varList);
      29              :     void DefineOutArg(const std::vector<Variable> &varList);
      30              :  
      31              :     void     SetCallLayer(uint16_t callLayer);
      32              :     uint16_t GetCallLayer() const;
      33              :     std::vector<Variable> GetInArgVars() const;
      34              : 
      35            8 :     CcuRepReferenceManager* GetFuncManager()
      36              :     {
      37            8 :         return funcManager;
      38              :     }
      39              :  
      40            0 :     std::vector<CcuRepArg>& GetInArgs()
      41              :     {
      42            0 :         return inArgs;
      43              :     }
      44              :  
      45            8 :     std::vector<CcuRepArg>& GetOutArgs()
      46              :     {
      47            8 :         return outArgs;
      48              :     }
      49              :  
      50           10 :     uint16_t GetCallLayer() { return callLayer; }
      51              :  
      52              : private:
      53              :     CcuRepReferenceManager *funcManager{nullptr};
      54              :  
      55              :     std::vector<CcuRepArg> inArgs;
      56              :     std::vector<CcuRepArg> outArgs;
      57              :     uint64_t               inArgCount{0};
      58              :     uint64_t               outArgCount{0};
      59              :  
      60              :     uint16_t callLayer{0};
      61              : };
      62              : 
      63              : };     // namespace CcuRep
      64              : };     // namespace hcomm
      65              : #endif // _CCU_REPRESENTATION_FUNC_BLOCK_H
        

Generated by: LCOV version 2.0-1