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_LOC_RECORD_EVENT_H
12 : #define HCOMM_CCU_REPRESENTATION_LOC_RECORD_EVENT_H
13 :
14 : #include "ccu_datatype_v1.h"
15 : #include "ccu_rep_base_v1.h"
16 :
17 : namespace hcomm {
18 : namespace CcuRep {
19 :
20 : class CcuRepLocRecordEvent : public CcuRepBase {
21 : public:
22 : explicit CcuRepLocRecordEvent(CcuInsGeneratorBase* insGenPtr, const CompletedEvent& event, uint32_t mask);
23 : bool Translate(CcuKernel* ccuKernel, CcuInstr*& instr, uint16_t& instrId, const TransDep& dep) override;
24 : std::string Describe() override;
25 0 : uint16_t GetEventId() { return event_.Id(); }
26 12 : uint32_t GetMask() { return mask_; }
27 :
28 11 : CompletedEvent GetEvent() { return event_; }
29 :
30 : private:
31 : CcuInsGeneratorBase* insGenPtr{nullptr};
32 : CompletedEvent event_{};
33 : uint32_t mask_{1};
34 : };
35 :
36 : }; // namespace CcuRep
37 : }; // namespace hcomm
38 : #endif // HCOMM_CCU_REPRESENTATION_LOC_RECORD_EVENTH
|