Line data Source code
1 : /**
2 : * Copyright (c) 2025 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 : #include "hccl_mem.h"
12 : #include "hccl_mem_v2.h"
13 :
14 2 : HcclResult HcclMemReg(HcclNetDev netDev, const HcclMem *mem, HcclBuf *buf)
15 : {
16 2 : return HcclMemRegV2(netDev, mem, buf);
17 : }
18 :
19 2 : HcclResult HcclMemDereg(const HcclBuf *buf)
20 : {
21 2 : return HcclMemDeregV2(buf);
22 : }
23 :
24 2 : HcclResult HcclMemExport(HcclBuf *buf, char **outDesc, uint64_t *outDescLen)
25 : {
26 2 : return HcclMemExportV2(buf, outDesc, outDescLen);
27 : }
28 :
29 1 : HcclResult HcclMemImport(const char *description, uint32_t descLen, bool isRemote, HcclBuf *outBuf, HcclNetDevCtx netDevCtx)
30 : {
31 1 : return HcclMemImportV2(description, descLen, isRemote, outBuf, netDevCtx);
32 : }
33 :
34 1 : HcclResult HcclMemClose(HcclBuf *buf)
35 : {
36 1 : return HcclMemCloseV2(buf);
37 : }
|