Abstraction for a UCX worker.
More...
#include <ucxpp/worker.h>
|
class | local_address |
|
class | endpoint |
|
Abstraction for a UCX worker.
◆ worker()
ucxpp::worker::worker |
( |
std::shared_ptr< context > |
ctx | ) |
|
Construct a new worker object.
- Parameters
-
◆ arm()
bool ucxpp::worker::arm |
( |
| ) |
const |
Arm the worker for next event notification.
- Returns
- true If the worker was armed
-
false If the worker has pending events. In this case, the user must call progress() until it returns false.
◆ context_ptr()
std::shared_ptr< context > ucxpp::worker::context_ptr |
( |
| ) |
const |
Get the worker's context object.
- Returns
- std::shared_ptr<context> The worker's context object
◆ event_fd()
int ucxpp::worker::event_fd |
( |
| ) |
const |
Get the event fd for the worker. The wakeup feature must be enabled for this to work.
- Returns
- int
◆ flush()
◆ get_address()
Get the worker's UCX address.
- Returns
- local_address The worker's UCX address
◆ handle()
ucp_worker_h ucxpp::worker::handle |
( |
| ) |
const |
Get the worker's native UCX handle.
- Returns
- ucp_worker_h The worker's native UCX handle
◆ progress()
bool ucxpp::worker::progress |
( |
| ) |
const |
Progress the worker.
- Returns
- true If progress was made
-
false If no progress was made
◆ tag_recv()
tag_recv_awaitable ucxpp::worker::tag_recv |
( |
void * |
buffer, |
|
|
size_t |
length, |
|
|
ucp_tag_t |
tag, |
|
|
ucp_tag_t |
tag_mask = 0xFFFFFFFFFFFFFFFF |
|
) |
| const |
Tag receive to the buffer.
- Parameters
-
buffer | The buffer to receive to |
length | The length of the buffer |
tag | The tag to receive with |
tag_mask | The bit mask for tag matching, 0 means accepting any tag |
- Returns
- tag_recv_awaitable A coroutine that returns a pair of number of bytes received and the sender tag upon completion
The documentation for this class was generated from the following files: