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

            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_AND_H
      12              : #define HCCL_CCU_REPRESENTATION_AND_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 CcuRepAnd : public CcuRepBase {
      21              : public:
      22              :     explicit CcuRepAnd(CcuInsGeneratorBase* insGenPtr, const Variable &varC, const Variable &varA, const Variable &varB);
      23              :     explicit CcuRepAnd(CcuInsGeneratorBase* insGenPtr, const Variable &varC, const Variable &varB);
      24              :     bool Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &curInstrId, const TransDep &dep) override;
      25            2 :     Variable GetVarA()
      26              :     {
      27            2 :         return varA;
      28              :     }
      29            2 :     Variable GetVarB()
      30              :     {
      31            2 :         return varB;
      32              :     }
      33              : 
      34            2 :     Variable GetVarC()
      35              :     {
      36            2 :         return varC;
      37              :     }
      38              : 
      39            2 :     AndSubType GetSubType()
      40              :     {
      41            2 :         return subType;
      42              :     }
      43              : 
      44              :     std::string Describe() override;
      45              : 
      46              : private:
      47              :     AndSubType subType{AndSubType::INVALID};
      48              : 
      49              :     Variable varA;
      50              :     Variable varB;
      51              :     Variable varC;
      52              : 
      53              :     CcuInsGeneratorBase* insGenPtr{nullptr};
      54              : };
      55              : 
      56              : }; // namespace CcuRep
      57              : }; // namespace hcomm
      58              : #endif // HCCL_CCU_REPRESENTATION_AND_H
        

Generated by: LCOV version 2.0-1