6#include <ucs/type/status.h>
9#include <ucp/api/ucp.h>
11#include "ucxpp/address.h"
12#include "ucxpp/awaitable.h"
13#include "ucxpp/error.h"
14#include "ucxpp/memory.h"
15#include "ucxpp/task.h"
16#include "ucxpp/worker.h"
18#include "ucxpp/detail/noncopyable.h"
27 public std::enable_shared_from_this<endpoint> {
32 std::shared_ptr<worker> worker_;
53 static void error_cb(
void *ep, ucp_ep_h ep_h, ucs_status_t status);
110 ucp_tag_t tag)
const;
134 static void close_cb(
void *request, ucs_status_t status,
void *user_data);
Abstraction for a UCX endpoint.
Definition: endpoint.h:27
void print() const
Print the endpoint's information.
Definition: endpoint.cc:55
static void error_cb(void *ep, ucp_ep_h ep_h, ucs_status_t status)
Error handler for all endpoints.
Definition: endpoint.cc:20
endpoint(std::shared_ptr< worker > worker, remote_address const &peer)
Construct a new endpoint object.
Definition: endpoint.cc:41
~endpoint()
Destroy the endpoint object. If the endpoint is not closed yet, it will be closed.
Definition: endpoint.cc:91
stream_recv_awaitable stream_recv(void *buffer, size_t length) const
Stream receive to the buffer.
Definition: endpoint.cc:66
std::shared_ptr< worker > worker_ptr() const
Get the worker object.
Definition: endpoint.cc:53
const remote_address & get_address() const
Get the endpoint's remote address.
Definition: endpoint.cc:59
task< void > close()
Close the endpoint. You should not use the endpoint after calling this function.
Definition: endpoint.cc:79
tag_send_awaitable tag_send(void const *buffer, size_t length, ucp_tag_t tag) const
Tag send the buffer.
Definition: endpoint.cc:70
static void close_cb(void *request, ucs_status_t status, void *user_data)
Endpoint close callback.
Definition: endpoint.cc:85
ep_flush_awaitable flush() const
Flush the endpoint.
Definition: endpoint.cc:75
ucp_ep_h handle() const
Get the endpoint's native UCX handle.
Definition: endpoint.cc:57
stream_send_awaitable stream_send(void const *buffer, size_t length) const
Stream send the buffer.
Definition: endpoint.cc:61
Definition: awaitable.h:198
Definition: awaitable.h:189
Represents a registered local memory region.
Definition: memory.h:37
Definition: noncopyable.h:5
Represents a remote UCX address.
Definition: address.h:83
Represents a remote memory region. Note that this does not contain the remote address....
Definition: memory.h:98
Definition: awaitable.h:219
Definition: awaitable.h:70
Definition: awaitable.h:87
Abstraction for a UCX worker.
Definition: worker.h:20