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 HCOMM_CCU_REPRESENTATION_LOADARG_H
12 : #define HCOMM_CCU_REPRESENTATION_LOADARG_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 CcuRepLoadArg : public CcuRepBase {
21 : public:
22 : explicit CcuRepLoadArg(CcuInsGeneratorBase* insGenPtr, const Variable& var, uint16_t argId, uint16_t fullArgId);
23 : bool Translate(CcuKernel* ccuKernel, CcuInstr*& instr, uint16_t& instrId, const TransDep& dep) override;
24 : std::string Describe() override;
25 :
26 49 : CcuRep::Variable GetVar() { return var; }
27 48 : uint16_t GetArgId() { return argId; }
28 1 : uint16_t GetVarId() const { return var.Id(); }
29 230 : uint16_t GetFullArgId() const { return fullArgId; }
30 :
31 : private:
32 : CcuInsGeneratorBase* insGeneratorPtr_{nullptr};
33 : Variable var;
34 : uint16_t argId{0};
35 : uint16_t fullArgId{0};
36 : };
37 :
38 : }; // namespace CcuRep
39 : }; // namespace hcomm
40 : #endif // HCCL_CCU_REPRESENTATION_LOADARG_H
|