LCOV - code coverage report
Current view: top level - base_comm/resources/ccu/ccu_representation/reps/control - ccu_rep_funccall_v1.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 85.7 % 7 6
Test Date: 2026-07-28 12:11:00 Functions: 85.7 % 7 6

            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_CALL_H
       8              : #define CCU_REPRESENTATION_FUNC_CALL_H
       9              : 
      10              : #include "ccu_rep_base_v1.h"
      11              : #include "ccu_rep_funcblock_v1.h"
      12              : #include "ccu_rep_reference_manager_v1.h"
      13              : 
      14              : namespace hcomm {
      15              : namespace CcuRep {
      16              : 
      17              : class CcuRepFuncCall : public CcuRepBase {
      18              : public:
      19              :     explicit CcuRepFuncCall(CcuInsGeneraterBase* insGenPtr, const std::string &label);
      20              :     explicit CcuRepFuncCall(CcuInsGeneraterBase* insGenPtr, const Variable &funcAddrVar);
      21              :     bool               Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &instrId, const TransDep &dep) override;
      22              :     std::string        Describe() override;
      23              :     uint16_t InstrCount() override;
      24              :     const std::string &GetLabel() const;
      25              : 
      26              :     void Reference(std::shared_ptr<CcuRepFuncBlock> refRep);
      27              :     void SetFuncManager(CcuRepReferenceManager *funcManager);
      28              : 
      29              :     void SetInArg(const Variable &var);
      30              :     void SetOutArg(const Variable &var);
      31              :     void SetInArg(const std::vector<Variable> &varList);
      32              :     void SetOutArg(const std::vector<Variable> &varList);
      33              : 
      34              :     int32_t GetCallLayer();
      35              : 
      36            5 :     CcuRepReferenceManager* GetFuncManager() { return funcManager; }
      37            5 :     std::shared_ptr<CcuRepFuncBlock>& GetFuncBlock() { return funcBlock; }
      38            0 :     Variable GetFuncAddrVar() { return funcAddrVar; }
      39            5 :     std::vector<CcuRepArg>& GetInArgs() { return inArgs; }
      40            5 :     std::vector<CcuRepArg>& GetOutArgs() { return outArgs; }
      41            5 :     uint32_t GetInArgCount() { return inArgCount; }
      42              :     uint32_t GetOutArgCount() { return outArgCount; }
      43            5 :     CcuInstr* GetInstr() { return instr; }
      44              : 
      45              : private:
      46              :     CcuInsGeneraterBase*    insGeneratorPtr_;
      47              :     CcuRepReferenceManager* funcManager{nullptr};
      48              : 
      49              :     std::string                      label;
      50              :     std::shared_ptr<CcuRepFuncBlock> funcBlock{nullptr};
      51              :     Variable                         funcAddrVar;
      52              : 
      53              :     std::vector<CcuRepArg> inArgs;
      54              :     std::vector<CcuRepArg> outArgs;
      55              :     uint32_t               inArgCount{0};
      56              :     uint32_t               outArgCount{0};
      57              : 
      58              :     CcuInstr *instr{nullptr};
      59              : };
      60              : 
      61              : };     // namespace CcuRep
      62              : };     // namespace hcomm
      63              : #endif // _CCU_REPRESENTATION_FUNC_CALL_H
        

Generated by: LCOV version 2.0-1