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 | detail::ConstructorFactory |
| class | RequestTag |
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. |