16 #include <string_view>
17 #include <unordered_map>
20 #include <ucp/api/ucp.h>
43 UCXX_LOG_LEVEL_TRACE_REQ,
44 UCXX_LOG_LEVEL_TRACE_DATA,
45 UCXX_LOG_LEVEL_TRACE_ASYNC,
46 UCXX_LOG_LEVEL_TRACE_FUNC,
47 UCXX_LOG_LEVEL_TRACE_POLL,
65 enum Tag : ucp_tag_t {};
80 static constexpr
TagMask TagMaskFull{std::numeric_limits<std::underlying_type_t<TagMask>>::max()};
88 typedef std::unordered_map<std::string, std::string>
ConfigMap;
194 uint32_t
flags{UCP_AM_SEND_FLAG_REPLY};
219 if (size > 0 && data ==
nullptr)
220 throw std::invalid_argument(
221 "AmSendParams::setUserHeader received null data with non-zero size");
223 if (size > 0) memcpy(
userHeader.data(), data, size);
Information of an Active Message receiver callback.
Definition: typedefs.h:160
AmReceiverCallbackOwnerType owner
The owner name of the callback.
Definition: typedefs.h:162
AmReceiverCallbackInfo(const AmReceiverCallbackOwnerType owner, AmReceiverCallbackIdType id)
Construct an AmReceiverCallbackInfo object.
AmReceiverCallbackIdType id
The unique identifier of the callback.
Definition: typedefs.h:163
std::function< void(ucs_status_t, std::shared_ptr< void >)> RequestCallbackUserFunction
A user-defined function to execute as part of a ucxx::Request callback.
Definition: typedefs.h:96
std::shared_ptr< void > RequestCallbackUserData
Data for the user-defined function provided to the ucxx::Request callback.
Definition: typedefs.h:104
std::unordered_map< std::string, std::string > ConfigMap
A UCP configuration map.
Definition: typedefs.h:88
RequestCallbackUserData EndpointCloseCallbackUserData
Data for the user-defined function provided to endpoint close callback.
Definition: typedefs.h:120
TransferDirection
The direction of a UCXX transfer.
Definition: typedefs.h:57
std::function< std::shared_ptr< Buffer >size_t)> AmAllocatorType
Custom Active Message allocator type.
Definition: typedefs.h:128
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.
@ ErrorOnUnsupported
If no allocator exists for memory type, fail with unsupported error.
const std::string SerializedRemoteKey
Serialized form of a remote key.
Definition: typedefs.h:240
ucxx_log_level_t
Available logging levels.
Definition: typedefs.h:35
uint64_t AmReceiverCallbackIdType
Active Message receiver callback identifier.
Definition: typedefs.h:153
RequestCallbackUserFunction EndpointCloseCallbackUserFunction
A user-defined function to execute after an endpoint closes.
Definition: typedefs.h:112
std::string AmReceiverCallbackOwnerType
Active Message receiver callback owner name.
Definition: typedefs.h:146
TagMask
Strong type for a UCP tag mask.
Definition: typedefs.h:73
Tag
Strong type for a UCP tag.
Definition: typedefs.h:65
std::function< void(std::shared_ptr< Request >, ucp_ep_h)> AmReceiverCallbackType
Active Message receiver callback.
Definition: typedefs.h:137
Parameters controlling Active Message send behavior.
Definition: typedefs.h:193
std::optional< AmReceiverCallbackInfo > receiverCallbackInfo
Optional receiver callback metadata.
Definition: typedefs.h:199
ucp_datatype_t datatype
Datatype used by ucp_am_send_nbx.
Definition: typedefs.h:195
AmSendMemoryTypePolicy memoryTypePolicy
Receiver allocation policy.
Definition: typedefs.h:197
void setUserHeader(std::string_view data)
Convenience overload to set user header from string-like views.
Definition: typedefs.h:231
std::vector< std::byte > userHeader
Definition: typedefs.h:201
void setUserHeader(const void *data, size_t size)
Set opaque user header bytes from raw pointer.
Definition: typedefs.h:217
ucs_memory_type_t memoryType
Sender memory type hint.
Definition: typedefs.h:196
uint32_t flags
UCP AM send flags.
Definition: typedefs.h:194