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 typedef std::unordered_map<std::string, std::string> ConfigMap;
82 
89 typedef std::function<void(ucs_status_t, std::shared_ptr<void>)> RequestCallbackUserFunction;
90 
97 typedef std::shared_ptr<void> RequestCallbackUserData;
98 
106 
114 
121 typedef std::function<std::shared_ptr<Buffer>(size_t)> AmAllocatorType;
122 
129 typedef std::function<void(std::shared_ptr<Request>)> AmReceiverCallbackType;
130 
138 typedef std::string AmReceiverCallbackOwnerType;
139 
145 typedef uint64_t AmReceiverCallbackIdType;
146 
147 typedef const std::string AmReceiverCallbackInfoSerialized;
148 
155  public:
156  const AmReceiverCallbackOwnerType owner;
157  const AmReceiverCallbackIdType id;
158 
159  AmReceiverCallbackInfo() = delete;
161 };
162 
163 typedef const std::string SerializedRemoteKey;
164 
165 } // namespace ucxx
Information of an Active Message receiver callback.
Definition: typedefs.h:154
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:89
std::shared_ptr< void > RequestCallbackUserData
Data for the user-defined function provided to the ucxx::Request callback.
Definition: typedefs.h:97
std::unordered_map< std::string, std::string > ConfigMap
A UCP configuration map.
Definition: typedefs.h:81
RequestCallbackUserData EndpointCloseCallbackUserData
Data for the user-defined function provided to endpoint close callback.
Definition: typedefs.h:113
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:121
ucxx_log_level_t
Available logging levels.
Definition: typedefs.h:28
std::function< void(std::shared_ptr< Request >)> AmReceiverCallbackType
Active Message receiver callback.
Definition: typedefs.h:129
uint64_t AmReceiverCallbackIdType
Active Message receiver callback identifier.
Definition: typedefs.h:145
RequestCallbackUserFunction EndpointCloseCallbackUserFunction
A user-defined function to execute after an endpoint closes.
Definition: typedefs.h:105
std::string AmReceiverCallbackOwnerType
Active Message receiver callback owner name.
Definition: typedefs.h:138
TagMask
Strong type for a UCP tag mask.
Definition: typedefs.h:66
Tag
Strong type for a UCP tag.
Definition: typedefs.h:58