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 : #include "rmt_rma_buf_slice_lite.h"
11 : #include "log.h"
12 : #include "string_util.h"
13 : namespace Hccl {
14 144 : RmtRmaBufSliceLite::RmtRmaBufSliceLite(u64 addr, u64 size, u32 rkey, u32 tokenId, u32 tokenValue, u32 notifyId)
15 144 : : addr_(addr),
16 144 : size_(size),
17 144 : rkey_(rkey),
18 144 : tokenId_(tokenId),
19 144 : tokenValue_(tokenValue),
20 144 : notifyId_(notifyId)
21 : {
22 430 : HCCL_INFO("RmtRmaBufSliceLite::RmtRmaBufSliceLite:%s", Describe().c_str());
23 144 : }
24 :
25 147 : std::string RmtRmaBufSliceLite::Describe() const
26 : {
27 : return StringFormat(
28 147 : "RmtRmaBufSliceLite[addr=0x%llx, size=0x%llx, rkey=%u, notifyId=%u]", addr_, size_, rkey_, notifyId_);
29 : }
30 :
31 : } // namespace Hccl
|