6#include "ucxpp/awaitable.h"
7#include "ucxpp/context.h"
9#include "ucxpp/detail/noncopyable.h"
28 void const *get_buffer()
const;
29 size_t get_length()
const;
38 std::shared_ptr<context> ctx_;
65 static std::pair<void *, local_memory_handle>
66 allocate_mem(std::shared_ptr<context> ctx,
size_t length);
68 void *address,
size_t length);
99 std::shared_ptr<endpoint> endpoint_;
113 void const *packed_rkey_buffer);
131 uint64_t remote_addr)
const;
142 uint64_t remote_addr)
const;
149 uint64_t remote_addr)
const;
156 uint64_t remote_addr)
const;
170 ucp_rkey_h
handle()
const;
185 T &old_value)
const {
203 T &old_value)
const {
221 T &old_value)
const {
239 T &old_value)
const {
255 T
const &delta)
const {
271 T
const &bits)
const {
302 T
const &bits)
const {
320 T &old_value)
const {
322 remote_addr, rkey_, &old_value);
339 T &desired_and_old)
const {
341 rkey_, &desired_and_old);
Abstraction for a UCX endpoint.
Definition: endpoint.h:27
Represents a registered local memory region.
Definition: memory.h:37
static std::pair< void *, local_memory_handle > allocate_mem(std::shared_ptr< context > ctx, size_t length)
Allocate and register a local memory region.
Definition: memory.cc:38
~local_memory_handle()
Destroy the local memory handle object. The memory region will be deregistered.
Definition: memory.cc:65
packed_memory_rkey pack_rkey() const
Pack the information needed for remote access to the memory region. It is intended to be sent to the ...
Definition: memory.cc:55
local_memory_handle(std::shared_ptr< context > ctx, ucp_mem_h mem)
Construct a new local memory handle object.
Definition: memory.cc:15
ucp_mem_h handle() const
Get the native UCX memory handle.
Definition: memory.cc:63
Definition: noncopyable.h:5
A serializable UCX memory handle ready to send to peer.
Definition: memory.h:19
Represents a remote memory region. Note that this does not contain the remote address....
Definition: memory.h:98
~remote_memory_handle()
Destroy the remote memory handle object and the associated rkey handle.
Definition: memory.cc:129
rma_atomic_awaitable< T > atomic_xor(uint64_t remote_addr, T const &bits) const
Atomically XOR a value to the remote memory region.
Definition: memory.h:301
rma_atomic_awaitable< T > atomic_fetch_and(uint64_t remote_addr, T const &bits, T &old_value) const
Atomically fetch and AND a value to the remote memory region.
Definition: memory.h:202
ucp_rkey_h handle() const
Get the native UCX rkey handle.
Definition: memory.cc:107
remote_memory_handle(std::shared_ptr< endpoint > endpoint, void const *packed_rkey_buffer)
Construct a new remote memory handle object. All subsequent remote memory access will happen on the g...
Definition: memory.cc:90
rma_get_awaitable get(void *buffer, size_t length, uint64_t remote_addr) const
Read from the remote memory region.
Definition: memory.cc:114
rma_atomic_awaitable< T > atomic_and(uint64_t remote_addr, T const &bits) const
Atomically AND a value in the remote memory region.
Definition: memory.h:270
rma_put_awaitable put(void const *buffer, size_t length, uint64_t remote_addr) const
Write to the remote memory region.
Definition: memory.cc:109
rma_put_awaitable write(void const *buffer, size_t length, uint64_t remote_addr) const
Definition: memory.cc:119
rma_get_awaitable read(void *buffer, size_t length, uint64_t remote_addr) const
Definition: memory.cc:124
std::shared_ptr< endpoint > endpoint_ptr() const
Get the memory region's endpoint object.
Definition: memory.cc:103
rma_atomic_awaitable< T > atomic_add(uint64_t remote_addr, T const &delta) const
Atomically add to a value in the remote memory region.
Definition: memory.h:254
rma_atomic_awaitable< T > atomic_fetch_or(uint64_t remote_addr, T const &bits, T &old_value) const
Atomically fetch and OR a value to the remote memory region.
Definition: memory.h:220
rma_atomic_awaitable< T > atomic_compare_swap(uint64_t raddr, T const &expected, T &desired_and_old) const
Atomically compare and swap a value in the remote memory region.
Definition: memory.h:338
rma_atomic_awaitable< T > atomic_swap(uint64_t remote_addr, T const &new_value, T &old_value) const
Atomically swap a value in the remote memory region.
Definition: memory.h:319
rma_atomic_awaitable< T > atomic_or(uint64_t remote_addr, T const &bits) const
Atomically OR to a value in the remote memory region.
Definition: memory.h:285
rma_atomic_awaitable< T > atomic_fetch_xor(uint64_t remote_addr, T const &bits, T &old_value) const
Atomically fetch and XOR a value to the remote memory region.
Definition: memory.h:238
rma_atomic_awaitable< T > atomic_fetch_add(uint64_t remote_addr, T const &delta, T &old_value) const
Atomically fetch and add a value to the remote memory region.
Definition: memory.h:184
Definition: awaitable.h:151
Definition: awaitable.h:128
Definition: awaitable.h:106