Component encapsulating the address of a UCP worker. More...
#include <address.h>
Public Member Functions | |
| Address (const Address &)=delete | |
| Address & | operator= (Address const &)=delete |
| Address (Address &&o)=delete | |
| Address & | operator= (Address &&o)=delete |
| ucp_address_t * | getHandle () const |
Get the underlying ucp_address_t* handle. More... | |
| size_t | getLength () const |
Get the length of the ucp_address_t* handle. More... | |
| std::string | getString () const |
| Get the address as a string. More... | |
Public Member Functions inherited from ucxx::Component | |
| void | setParent (std::shared_ptr< Component > parent) |
| Set the internal parent reference. More... | |
| std::shared_ptr< Component > | getParent () const |
| Get the internal parent reference. More... | |
Friends | |
| std::shared_ptr< Address > | createAddressFromWorker (std::shared_ptr< Worker > worker) |
Constructor for shared_ptr<ucxx::Address> from worker. More... | |
| std::shared_ptr< Address > | createAddressFromString (std::string addressString) |
Constructor for shared_ptr<ucxx::Address> from string. More... | |
Additional Inherited Members | |
Protected Attributes inherited from ucxx::Component | |
| std::shared_ptr< Component > | _parent {nullptr} |
| A reference-counted pointer to the parent. | |
Component encapsulating the address of a UCP worker.
A UCP worker has a unique address that can is contained in a ucp_address_t* object, this class encapsulates that object and provides methods to simplify its handling.
| ucp_address_t* ucxx::Address::getHandle | ( | ) | const |
Get the underlying ucp_address_t* handle.
Lifetime of the ucp_address_t* handle is managed by the ucxx::Address object and its ownership is non-transferrable. Once the ucxx::Address is destroyed the handle is not valid anymore, it is the user's responsibility to ensure the owner's lifetime while using the handle.
ucp_address_t handle. | size_t ucxx::Address::getLength | ( | ) | const |
Get the length of the ucp_address_t* handle.
Get the length of the ucp_address_t* handle, required to access the complete address and prevent reading out-of-bound.
ucp_address_t* handle in bytes. | std::string ucxx::Address::getString | ( | ) | const |
Get the address as a string.
Convenience method to copy the underlying address to a std::string and return it as a single object.
ucp_address_t handle.
|
friend |
Constructor for shared_ptr<ucxx::Address> from string.
The constructor for a shared_ptr<ucxx::Address> object from the address extracted as string from a remote std::shared_ptr<ucxx::Worker>.
| [in] | addressString | the string from which to create the address. |
shared_ptr<ucxx::Address> object. Constructor for shared_ptr<ucxx::Address> from worker.
The constructor for a shared_ptr<ucxx::Address> object from a std::shared_ptr<ucxx::Worker> to obtain its address.
| [in] | worker | parent worker from which to get the address. |
shared_ptr<ucxx::Address> object.