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_REMWAITSEM_H
12 : #define HCOMM_CCU_REPRESENTATION_REMWAITSEM_H
13 :
14 : #include "ccu_rep_base_v1.h"
15 :
16 : namespace hcomm {
17 : namespace CcuRep {
18 :
19 : class CcuRepRemWaitSem : public CcuRepBase {
20 : public:
21 : explicit CcuRepRemWaitSem(
22 : CcuInsGeneratorBase* insGenPtr, const ChannelHandle channel, uint16_t semIndex, uint16_t mask,
23 : bool isProfiling = true);
24 : bool Translate(CcuKernel* ccuKernel, CcuInstr*& instr, uint16_t& instrId, const TransDep& dep) override;
25 : std::string Describe() override;
26 0 : uint32_t GetId() override { return signalId; }
27 : uint16_t GetChannelId() { return channelId; }
28 :
29 6 : bool GetIsProfiling() { return isProfiling; }
30 8 : ChannelHandle GetChannel() { return channel; }
31 7 : uint16_t GetSemIndex() { return semIndex; }
32 7 : uint16_t GetMask() { return mask; }
33 :
34 : private:
35 : CcuInsGeneratorBase* insGenPtr{nullptr};
36 : ChannelHandle channel;
37 : uint16_t semIndex{0};
38 : uint16_t mask{0};
39 : bool isProfiling{true};
40 : uint32_t signalId{0};
41 : uint16_t channelId{0};
42 : };
43 :
44 : }; // namespace CcuRep
45 : }; // namespace hcomm
46 : #endif // HCOMM_CCU_REPRESENTATION_REMWAITSEM_H
|