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_REMPOSTVAR_H
12 : #define HCOMM_CCU_REPRESENTATION_REMPOSTVAR_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 CcuRepRemPostVar : public CcuRepBase {
21 : public:
22 : CcuRepRemPostVar(
23 : CcuInsGeneratorBase* insGenPtr, Variable param, const ChannelHandle channel, uint16_t paramIndex,
24 : uint16_t semIndex, uint16_t mask);
25 : bool Translate(CcuKernel* ccuKernel, CcuInstr*& instr, uint16_t& instrId, const TransDep& dep) override;
26 : std::string Describe() override;
27 : uint32_t GetRmtXnId() { return rmtXnId; }
28 : uint32_t GetRmtCkeId() { return rmtCkeId; }
29 14 : uint16_t GetParamIndex() { return paramIndex; }
30 9 : Variable GetParam() { return param; }
31 : uint32_t GetChannelId() { return channelId; }
32 :
33 21 : ChannelHandle GetChannel() { return channel; }
34 15 : uint16_t GetSemIndex() { return semIndex; }
35 9 : uint16_t GetMask() { return mask; }
36 :
37 : private:
38 : CcuInsGeneratorBase* insGenPtr{nullptr};
39 : Variable param;
40 : ChannelHandle channel;
41 : uint16_t paramIndex{0};
42 : uint16_t semIndex{0};
43 : uint16_t mask{0};
44 : uint32_t rmtXnId{0};
45 : uint32_t rmtCkeId{0};
46 : uint32_t channelId{0};
47 : };
48 :
49 : }; // namespace CcuRep
50 : }; // namespace hcomm
51 : #endif // HCOMM_CCU_REPRESENTATION_REMPOSTVAR_H
|