11 #include <ucp/api/ucp.h>
13 #include <ucxx/component.h>
14 #include <ucxx/endpoint.h>
15 #include <ucxx/memory_handle.h>
19 typedef size_t SerializedRemoteKeyHash;
32 ucp_rkey_h _remoteKey{
nullptr};
33 void* _packedRemoteKey{
35 size_t _packedRemoteKeySize{0};
36 std::vector<char> _packedRemoteKeyVector{};
37 uint64_t _memoryBaseAddress{0};
38 size_t _memorySize{0};
55 explicit RemoteKey(std::shared_ptr<MemoryHandle> memoryHandle);
74 RemoteKey(std::shared_ptr<Endpoint> endpoint, SerializedRemoteKey serializedRemoteKey);
91 void deserialize(
const SerializedRemoteKey& serializedHeader);
116 std::shared_ptr<MemoryHandle> memoryHandle);
144 std::shared_ptr<Endpoint> endpoint, SerializedRemoteKey serializedRemoteKey);
A UCXX component class to prevent early destruction of parent object.
Definition: component.h:17
Component holding a UCP rkey (remote key).
Definition: remote_key.h:30
friend std::shared_ptr< RemoteKey > createRemoteKeyFromMemoryHandle(std::shared_ptr< MemoryHandle > memoryHandle)
Constructor for std::shared_ptr<ucxx::RemoteKey> from local memory handle.
ucp_rkey_h getHandle()
Get the underlying ucp_rkey_h handle.
size_t getSize() const
Get the size of the memory allocation.
friend std::shared_ptr< RemoteKey > createRemoteKeyFromSerialized(std::shared_ptr< Endpoint > endpoint, SerializedRemoteKey serializedRemoteKey)
Constructor for std::shared_ptr<ucxx::RemoteKey> from remote.
uint64_t getBaseAddress()
Get the base address of the memory allocation.
SerializedRemoteKey serialize() const
Serialize the remote key.