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

            Line data    Source code
       1              : /**
       2              :  * Copyright (c) 2026 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_SHR_H
      12              : #define HCCL_CCU_REPRESENTATION_SHR_H
      13              : 
      14              : #include "ccu_rep_base_v1.h"
      15              : #include "ccu_datatype_v1.h"
      16              : 
      17              : namespace hcomm {
      18              : namespace CcuRep {
      19              : 
      20              : class CcuRepShR : public CcuRepBase {
      21              : public:
      22              :     explicit CcuRepShR(CcuInsGeneratorBase* insGenPtr, const Variable &varD, const Variable &varN, const Variable &varM);
      23              :     explicit CcuRepShR(CcuInsGeneratorBase* insGenPtr, const Variable &varD, const Variable &varM);
      24              :     explicit CcuRepShR(CcuInsGeneratorBase* insGenPtr, const Address &addrD, const Variable &varN, const Variable &varM);
      25              :     explicit CcuRepShR(CcuInsGeneratorBase* insGenPtr, const Address &addrD, const Variable &varM);
      26              :     bool Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &curInstrId, const TransDep &dep) override;
      27            8 :     ShiftSubType GetShiftSubType()
      28              :     {
      29            8 :         return subType;
      30              :     }
      31              : 
      32            8 :     ShiftType GetShiftType()
      33              :     {
      34            8 :         return shiftType;
      35              :     }
      36              : 
      37            4 :     Variable GetVarN()
      38              :     {
      39            4 :         return varN;
      40              :     }
      41              : 
      42            8 :     Variable GetVarM()
      43              :     {
      44            8 :         return varM;
      45              :     }
      46              : 
      47            5 :     Variable GetVarD()
      48              :     {
      49            5 :         return varD;
      50              :     }
      51              : 
      52            5 :     Address GetAddressD()
      53              :     {
      54            5 :         return addrD;
      55              :     }
      56              : 
      57              :     std::string Describe() override;
      58              : 
      59              : private:
      60              :     ShiftSubType subType{ShiftSubType::INVALID};
      61              : 
      62              :     ShiftType shiftType{ShiftType::INVALID};
      63              : 
      64              :     Variable varN;
      65              :     Variable varM;
      66              :     Variable varD;
      67              :     Address addrD;
      68              : 
      69              :     CcuInsGeneratorBase* insGenPtr{nullptr};
      70              : };
      71              : 
      72              : };     // namespace CcuRep
      73              : };     // namespace hcomm
      74              : #endif // HCCL_CCU_REPRESENTATION_SHR_H
        

Generated by: LCOV version 2.0-1