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 : #ifndef HCCLV2_RMT_RMA_BUF_SLICE_LITE_H
11 : #define HCCLV2_RMT_RMA_BUF_SLICE_LITE_H
12 : #include "hccl/base.h"
13 :
14 : namespace Hccl {
15 : class RmtRmaBufSliceLite {
16 : public:
17 : RmtRmaBufSliceLite(u64 addr, u64 size, u32 rkey, u32 tokenId, u32 tokenValue, u32 notifyId);
18 :
19 252 : inline u64 GetAddr() const { return addr_; }
20 :
21 3 : inline u64 GetSize() const { return size_; }
22 :
23 25 : inline u32 GetRkey() const { return rkey_; }
24 :
25 106 : inline u32 GetTokenId() const { return tokenId_; }
26 :
27 120 : inline u32 GetTokenValue() const { return tokenValue_; }
28 :
29 5 : inline u32 GetNotifyId() const { return notifyId_; }
30 :
31 : std::string Describe() const;
32 :
33 : private:
34 : u64 addr_;
35 : u64 size_;
36 : u32 rkey_;
37 : u32 tokenId_;
38 : u32 tokenValue_;
39 : u32 notifyId_{UINT32_MAX};
40 : };
41 : } // namespace Hccl
42 : #endif
|