Line data Source code
1 : /*
2 : * Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
3 : * Description: ccu representation implementation file
4 : * Author: sunzhepeng
5 : * Create: 2025-05-21
6 : */
7 :
8 : #include "ccu_rep_v1.h"
9 : #include "ccu_assist_v1.h"
10 :
11 : #include "string_util.h"
12 :
13 : #include "exception_util.h"
14 : #include "ccu_api_exception.h"
15 : #include "hcomm_c_adpt.h"
16 :
17 : #include "../../../../endpoint_pairs/channels/ccu/ccu_urma_channel.h"
18 : #include "ccu_ins_generater_base.h"
19 : #include "ccu_kernel.h"
20 :
21 : namespace hcomm {
22 : namespace CcuRep {
23 :
24 2 : CcuRepRemMem::CcuRepRemMem(CcuInsGeneraterBase* insGenPtr, const ChannelHandle channel, RemoteAddr rem)
25 2 : : insGenPtr(insGenPtr), channel(channel), rem(rem)
26 : {
27 2 : type = CcuRepType::REM_MEM;
28 2 : instrCount = 2; // 指令数为2个
29 2 : }
30 :
31 0 : bool CcuRepRemMem::Translate(CcuKernel* ccuKernel, CcuInstr *&instr, uint16_t &instrId, const TransDep &dep)
32 : {
33 0 : this->instrId = instrId;
34 0 : translated = true;
35 :
36 0 : instrCount = insGenPtr->GetInstrCount(type);
37 0 : insGenPtr->CcuRepRemMemTranslate(ccuKernel, instr, this);
38 0 : instrId += instrCount;
39 :
40 0 : return translated;
41 : }
42 :
43 0 : std::string CcuRepRemMem::Describe()
44 : {
45 0 : return Hccl::StringFormat("Get Remote Buffer Addr and TokenInfo By Transport");
46 : }
47 :
48 : }; // namespace CcuRep
49 : }; // namespace hcomm
|