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