Information about probed tag message. More...
#include <tag_probe.h>
Public Member Functions | |
| TagProbeInfo (const TagProbeInfo &)=delete | |
| TagProbeInfo & | operator= (TagProbeInfo const &)=delete |
| TagProbeInfo (TagProbeInfo &&o)=delete | |
| TagProbeInfo & | operator= (TagProbeInfo &&o)=delete |
| bool | isMatched () const |
| Check if a message was matched. More... | |
| const TagRecvInfo & | getInfo () const |
| Get tag receive information. More... | |
| ucp_tag_message_h | getHandle () const |
| Get the message handle. More... | |
| ucp_tag_message_h | releaseHandle () const |
| Release the message handle. More... | |
Friends | |
| class | RequestTag |
| std::shared_ptr< TagProbeInfo > | createTagProbeInfo () |
Constructor for shared_ptr<ucxx::TagProbeInfo>. More... | |
| std::shared_ptr< TagProbeInfo > | createTagProbeInfo (const ucp_tag_recv_info_t &info, ucp_tag_message_h handle) |
Constructor for shared_ptr<ucxx::TagProbeInfo>. More... | |
Information about probed tag message.
Contains complete information about a probed tag message, including whether a message was matched, the tag receive information, and the message handle for efficient reception when tagProbe() is called with remove=true.
isMatched() before calling getInfo() or getHandle() to prevent misuse and undefined behavior. When isMatched() returns false, getInfo() and getHandle() will throw std::runtime_error.shared_ptr without support for copy or move semantics to prevent multiple objects from holding the same handle, which could lead to undefined behavior if the message is received multiple times. | ucp_tag_message_h ucxx::TagProbeInfo::getHandle | ( | ) | const |
Get the message handle.
| std::runtime_error | if the handle is nullptr or has been consumed. |
| const TagRecvInfo& ucxx::TagProbeInfo::getInfo | ( | ) | const |
Get tag receive information.
| std::runtime_error | if no message was matched. |
| bool ucxx::TagProbeInfo::isMatched | ( | ) | const |
Check if a message was matched.
| ucp_tag_message_h ucxx::TagProbeInfo::releaseHandle | ( | ) | const |
Release the message handle.
Same as getHandle() but also marks the handle as consumed, therefore no warning is logged when the object is destroyed and is the user's responsibility to consume the handle via a direct UCP operation.
| std::runtime_error | if the handle is nullptr or has been consumed. |
|
friend |
Constructor for shared_ptr<ucxx::TagProbeInfo>.
The constructor for a shared_ptr<ucxx::TagProbeInfo> object, initializing the object as unmatched (isMatched() returns false).
shared_ptr<ucxx::TagProbeInfo> object
|
friend |
Constructor for shared_ptr<ucxx::TagProbeInfo>.
The constructor for a shared_ptr<ucxx::TagProbeInfo> object, initializing the object as matched (isMatched() returns true) with the provided info and handle.
| [in] | info | The UCP tag receive info structure. |
| [in] | handle | The UCP tag message handle (can be nullptr if tagProbe() is called with remove=false). |
shared_ptr<ucxx::TagProbeInfo> object