Loading...
Searching...
No Matches
ucxx::TagProbeInfo Class Reference

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.
const TagRecvInfo & getInfo () const
 Get tag receive information.
ucp_tag_message_h getHandle () const
 Get the message handle.
ucp_tag_message_h releaseHandle () const
 Release the message handle.

Friends

class detail::ConstructorFactory
class RequestTag

Detailed Description

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.

Warning
Callers must check isMatched() before calling getInfo() or getHandle() to prevent misuse and undefined behavior. When isMatched() returns false, getInfo() and getHandle() will throw std::runtime_error.
Note
This class is managed via 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.

Member Function Documentation

◆ getHandle()

ucp_tag_message_h ucxx::TagProbeInfo::getHandle ( ) const

Get the message handle.

Exceptions
std::runtime_errorif the handle is nullptr or has been consumed.
Returns
The UCP tag message handle.

◆ getInfo()

const TagRecvInfo & ucxx::TagProbeInfo::getInfo ( ) const

Get tag receive information.

Exceptions
std::runtime_errorif no message was matched.
Returns
The tag receive information.

◆ isMatched()

bool ucxx::TagProbeInfo::isMatched ( ) const

Check if a message was matched.

Returns
true if a message was matched, false otherwise.

◆ releaseHandle()

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.

Exceptions
std::runtime_errorif the handle is nullptr or has been consumed.
Returns
The UCP tag message handle.

The documentation for this class was generated from the following file: