All Classes Namespaces Functions Variables Typedefs Enumerations Friends
typedefs.h
1 
5 #pragma once
6 
7 #include <functional>
8 #include <limits>
9 #include <memory>
10 #include <string>
11 #include <unordered_map>
12 
13 #include <ucp/api/ucp.h>
14 
15 namespace ucxx {
16 
17 class Buffer;
18 class Request;
19 class RequestAm;
20 
28 typedef enum {
29  UCXX_LOG_LEVEL_FATAL, /* Immediate termination */
30  UCXX_LOG_LEVEL_ERROR, /* Error is returned to the user */
31  UCXX_LOG_LEVEL_WARN, /* Something's wrong, but we continue */
32  UCXX_LOG_LEVEL_DIAG, /* Diagnostics, silent adjustments or internal error handling */
33  UCXX_LOG_LEVEL_INFO, /* Information */
34  UCXX_LOG_LEVEL_DEBUG, /* Low-volume debugging */
35  UCXX_LOG_LEVEL_TRACE, /* High-volume debugging */
36  UCXX_LOG_LEVEL_TRACE_REQ, /* Every send/receive request */
37  UCXX_LOG_LEVEL_TRACE_DATA, /* Data sent/received on the transport */
38  UCXX_LOG_LEVEL_TRACE_ASYNC, /* Asynchronous progress engine */
39  UCXX_LOG_LEVEL_TRACE_FUNC, /* Function calls */
40  UCXX_LOG_LEVEL_TRACE_POLL, /* Polling functions */
41  UCXX_LOG_LEVEL_LAST, /* Last level barrier, not an actual level */
42  UCXX_LOG_LEVEL_PRINT /* Temporary output */
44 
50 enum class TransferDirection { Send = 0, Receive };
51 
58 enum Tag : ucp_tag_t {};
59 
66 enum TagMask : ucp_tag_t {};
67 
73 static constexpr TagMask TagMaskFull{std::numeric_limits<std::underlying_type_t<TagMask>>::max()};
74 
81 class TagRecvInfo {
82  public:
84  size_t length;
85 
86  explicit TagRecvInfo(const ucp_tag_recv_info_t&);
87 };
88 
95 typedef std::unordered_map<std::string, std::string> ConfigMap;
96 
103 typedef std::function<void(ucs_status_t, std::shared_ptr<void>)> RequestCallbackUserFunction;
104 
111 typedef std::shared_ptr<void> RequestCallbackUserData;
112 
120 
128 
135 typedef std::function<std::shared_ptr<Buffer>(size_t)> AmAllocatorType;
136 
144 typedef std::function<void(std::shared_ptr<Request>, ucp_ep_h)> AmReceiverCallbackType;
145 
153 typedef std::string AmReceiverCallbackOwnerType;
154 
160 typedef uint64_t AmReceiverCallbackIdType;
161 
162 typedef const std::string AmReceiverCallbackInfoSerialized;
163 
170  public:
171  const AmReceiverCallbackOwnerType owner;
172  const AmReceiverCallbackIdType id;
173 
174  AmReceiverCallbackInfo() = delete;
176 };
177 
178 typedef const std::string SerializedRemoteKey;
179 
180 } // namespace ucxx
Information of an Active Message receiver callback.
Definition: typedefs.h:169
Information about probed tag message.
Definition: typedefs.h:81
size_t length
The size of the received data.
Definition: typedefs.h:84
Tag senderTag
Sender tag.
Definition: typedefs.h:83
Definition: address.h:15
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:103
std::shared_ptr< void > RequestCallbackUserData
Data for the user-defined function provided to the ucxx::Request callback.
Definition: typedefs.h:111
std::unordered_map< std::string, std::string > ConfigMap
A UCP configuration map.
Definition: typedefs.h:95
RequestCallbackUserData EndpointCloseCallbackUserData
Data for the user-defined function provided to endpoint close callback.
Definition: typedefs.h:127
TransferDirection
The direction of a UCXX transfer.
Definition: typedefs.h:50
std::function< std::shared_ptr< Buffer >size_t)> AmAllocatorType
Custom Active Message allocator type.
Definition: typedefs.h:135
ucxx_log_level_t
Available logging levels.
Definition: typedefs.h:28
uint64_t AmReceiverCallbackIdType
Active Message receiver callback identifier.
Definition: typedefs.h:160
RequestCallbackUserFunction EndpointCloseCallbackUserFunction
A user-defined function to execute after an endpoint closes.
Definition: typedefs.h:119
std::string AmReceiverCallbackOwnerType
Active Message receiver callback owner name.
Definition: typedefs.h:153
TagMask
Strong type for a UCP tag mask.
Definition: typedefs.h:66
Tag
Strong type for a UCP tag.
Definition: typedefs.h:58
std::function< void(std::shared_ptr< Request >, ucp_ep_h)> AmReceiverCallbackType
Active Message receiver callback.
Definition: typedefs.h:144