13 #include <ucp/api/ucp.h>
15 #include <ucxx/tag_probe.h>
16 #include <ucxx/typedefs.h>
34 const std::vector<ucp_dt_iov_t>
_iov{};
37 const uint32_t
_flags{UCP_AM_SEND_FLAG_REPLY};
38 const ucp_datatype_t
_datatype{ucp_dt_make_contig(1)};
80 std::shared_ptr<::ucxx::Buffer>
_buffer{
nullptr};
152 const decltype(
_length) length,
154 const decltype(
_rkey) rkey);
183 const decltype(
_length) length,
185 const decltype(
_rkey) rkey);
260 const decltype(
_length) length,
261 const decltype(
_tag) tag);
290 const decltype(
_length) length,
291 const decltype(
_tag) tag,
348 const decltype(
_length)& length,
349 const decltype(
_isCUDA)& isCUDA,
350 const decltype(
_tag) tag);
379 using RequestData = std::variant<std::monostate,
394 template <
class... Ts>
396 using Ts::operator()...;
398 template <
class... Ts>
402 RequestData getRequestData(T t)
404 return std::visit([](
auto arg) -> RequestData {
return arg; }, t);
Data for an Active Message receive.
Definition: request_data.h:78
AmReceive()
Constructor for Active Message-specific receive data.
std::vector< std::byte > _userHeader
User-defined header bytes from the sender.
Definition: request_data.h:81
std::shared_ptr<::ucxx::Buffer > _buffer
The AM received message buffer.
Definition: request_data.h:80
Data for an Active Message send.
Definition: request_data.h:30
const size_t _count
Definition: request_data.h:35
const size_t _length
Message length in bytes (contiguous datatype only).
Definition: request_data.h:33
const ucs_memory_type_t _memoryType
Memory type used on the operation.
Definition: request_data.h:39
const void *const _buffer
The raw pointer where data to be sent is stored.
Definition: request_data.h:32
const std::vector< ucp_dt_iov_t > _iov
Segments for IOV datatype.
Definition: request_data.h:34
AmSend(const decltype(_buffer) buffer, const decltype(_length) length, const AmSendParams ¶ms=AmSendParams{})
Constructor for Active Message-specific send data.
const AmSendMemoryTypePolicy _memoryTypePolicy
Receiver allocation policy.
Definition: request_data.h:40
AmSend(decltype(_iov) iov, const AmSendParams ¶ms=AmSendParams{})
Constructor for Active Message-specific send data using IOV datatype.
const std::vector< std::byte > _userHeader
Opaque user-defined header bytes.
Definition: request_data.h:44
const uint32_t _flags
UCP AM send flags.
Definition: request_data.h:37
const std::optional< AmReceiverCallbackInfo > _receiverCallbackInfo
Owner name and unique identifier of the receiver callback.
Definition: request_data.h:42
const ucp_datatype_t _datatype
UCP datatype.
Definition: request_data.h:38
Data for an endpoint close operation.
Definition: request_data.h:99
EndpointClose(const decltype(_force) force)
Constructor for endpoint close-specific data.
const bool _force
Whether to force endpoint closing.
Definition: request_data.h:101
Data for a flush operation.
Definition: request_data.h:119
Flush()
Constructor for flush-specific data.
Data for a memory receive.
Definition: request_data.h:165
void * _buffer
The raw pointer where received data should be stored.
Definition: request_data.h:167
const uint64_t _remoteAddr
Remote memory address to read from.
Definition: request_data.h:169
const size_t _length
The length of the message.
Definition: request_data.h:168
const ucp_rkey_h _rkey
UCX remote key associated with the remote memory address.
Definition: request_data.h:170
MemGet(decltype(_buffer) buffer, const decltype(_length) length, const decltype(_remoteAddr) remoteAddr, const decltype(_rkey) rkey)
Constructor for memory-specific data.
Data for a memory send.
Definition: request_data.h:134
const uint64_t _remoteAddr
Remote memory address to write to.
Definition: request_data.h:138
const size_t _length
The length of the message.
Definition: request_data.h:137
const ucp_rkey_h _rkey
UCX remote key associated with the remote memory address.
Definition: request_data.h:139
const void *const _buffer
The raw pointer where data to be sent is stored.
Definition: request_data.h:136
MemPut(const decltype(_buffer) buffer, const decltype(_length) length, const decltype(_remoteAddr) remoteAddr, const decltype(_rkey) rkey)
Constructor for memory-specific data.
Data for an Stream receive.
Definition: request_data.h:220
StreamReceive(decltype(_buffer) buffer, const decltype(_length) length)
Constructor for stream-specific data.
const size_t _length
The expected messaged length.
Definition: request_data.h:223
void * _buffer
The raw pointer where received data should be stored.
Definition: request_data.h:222
size_t _lengthReceived
The actual received message length.
Definition: request_data.h:224
Data for a Stream send.
Definition: request_data.h:196
const void *const _buffer
The raw pointer where data to be sent is stored.
Definition: request_data.h:198
const size_t _length
The length of the message.
Definition: request_data.h:199
StreamSend(const decltype(_buffer) buffer, const decltype(_length) length)
Constructor for stream-specific data.
Data for a multi-buffer Tag receive.
Definition: request_data.h:361
const ::ucxx::Tag _tag
Tag to match.
Definition: request_data.h:363
TagMultiReceive(const decltype(_tag) tag, const decltype(_tagMask) tagMask)
Constructor for receive multi-buffer tag-specific data.
const ::ucxx::TagMask _tagMask
Tag mask to use.
Definition: request_data.h:364
Data for a multi-buffer Tag send.
Definition: request_data.h:330
const std::vector< const void * > _buffer
Raw pointers where data to be sent is stored.
Definition: request_data.h:332
const ::ucxx::Tag _tag
Tag to match.
Definition: request_data.h:335
TagMultiSend(const decltype(_buffer)&buffer, const decltype(_length)&length, const decltype(_isCUDA)&isCUDA, const decltype(_tag) tag)
Constructor for send multi-buffer tag-specific data.
const std::vector< int > _isCUDA
Flags indicating whether the buffer is CUDA or not.
Definition: request_data.h:334
const std::vector< size_t > _length
Lengths of messages.
Definition: request_data.h:333
Data for a Tag receive using a message handle.
Definition: request_data.h:303
TagReceiveWithHandle(decltype(_buffer) buffer, std::shared_ptr< TagProbeInfo > probeInfo)
Constructor for tag receive with handle-specific data.
void * _buffer
The raw pointer where received data should be stored.
Definition: request_data.h:305
const std::shared_ptr< TagProbeInfo > _probeInfo
TagProbeInfo containing message length and handle.
Definition: request_data.h:306
Data for a Tag receive.
Definition: request_data.h:272
const ::ucxx::Tag _tag
Tag to match.
Definition: request_data.h:276
TagReceive(decltype(_buffer) buffer, const decltype(_length) length, const decltype(_tag) tag, const decltype(_tagMask) tagMask)
Constructor for tag-specific data.
void * _buffer
The raw pointer where received data should be stored.
Definition: request_data.h:274
const size_t _length
The length of the message.
Definition: request_data.h:275
const ::ucxx::TagMask _tagMask
Tag mask to use.
Definition: request_data.h:277
AmSendMemoryTypePolicy
Policy used to allocate receive buffers for Active Messages.
Definition: typedefs.h:182
@ FallbackToHost
If no allocator exists for memory type, fallback to host memory.
Parameters controlling Active Message send behavior.
Definition: typedefs.h:193
Definition: request_data.h:395