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_NOT_H
12 : #define HCCL_CCU_REPRESENTATION_NOT_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 CcuRepNot : public CcuRepBase {
21 : public:
22 : CcuRepNot(CcuInsGeneratorBase* insGenPtr, const Variable &varC, const Variable &varB);
23 : bool Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &curInstrId, const TransDep &dep) override;
24 1 : Variable GetVarB()
25 : {
26 1 : return varB;
27 : }
28 1 : Variable GetVarC()
29 : {
30 1 : return varC;
31 : }
32 :
33 1 : NotSubType GetSubType()
34 : {
35 1 : return subType;
36 : }
37 :
38 : std::string Describe() override;
39 :
40 : private:
41 : NotSubType subType{NotSubType::INVALID};
42 :
43 : Variable varB;
44 : Variable varC;
45 :
46 : CcuInsGeneratorBase* insGenPtr{nullptr};
47 : };
48 :
49 : }; // namespace CcuRep
50 : }; // namespace hcomm
51 : #endif // HCCL_CCU_REPRESENTATION_NOT_H
|