Line data Source code
1 : /*
2 : * Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
3 : * Description: ccu representation load header file
4 : * Create: 2025-02-18
5 : */
6 :
7 : #ifndef HCOMM_CCU_REPRESENTATION_STORE_H
8 : #define HCOMM_CCU_REPRESENTATION_STORE_H
9 :
10 : #include "ccu_rep_base_v1.h"
11 : #include "ccu_datatype_v1.h"
12 : #include <cstdint>
13 :
14 : namespace hcomm {
15 : namespace CcuRep {
16 :
17 : class CcuRepStore : public CcuRepBase {
18 : public:
19 : CcuRepStore(CcuInsGeneraterBase* insGenPtr, const Variable &var, uint64_t addr, uint32_t num = 1);
20 : bool Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &instrId, const TransDep &dep) override;
21 : std::string Describe() override;
22 :
23 3 : CcuRep::Variable GetVar() { return var; }
24 3 : uint64_t GetAddr() { return addr; }
25 3 : uint32_t GetNum() { return num; }
26 6 : uint16_t GetMask() { return mask; }
27 :
28 : private:
29 : uint16_t mask{1};
30 : CcuInsGeneraterBase* insGeneratorPtr_{nullptr};
31 : Variable var;
32 : uint64_t addr;
33 : uint32_t num;
34 : };
35 :
36 : }; // namespace CcuRep
37 : }; // namespace hcomm
38 : #endif // HCCL_CCU_REPRESENTATION_STORE_H
|