Tags¶
Overview¶
A integer-valued message tag must be specified in some communication operations. The class mpl::tag_t wraps such tag into a custom class. This tag can be used by the program to distinguish different types of messages.
Class documentation¶
-
class tag_t¶
Class for representing tag parameters in communication operations.
Public Functions
-
inline explicit tag_t(int t = 0)¶
Initializes tag from an integer value.
- Parameters:
t – tag value
-
template<typename T, typename = std::enable_if_t<detail::is_valid_tag_v<T>>>
inline tag_t(T t)¶ Initializes tag from an enum value.
The enum’s underlying type must be convertible to int without loss of precession (narrowing).
- Parameters:
t – tag value
-
inline explicit operator int() const¶
- Returns:
tag value as integer
Public Static Functions
-
static inline tag_t any()¶
See also
- Returns:
wildcard tag to be used in receive operations, e.g.,
communicator::recv, to indicate acceptance of a message with any tag value
-
inline explicit tag_t(int t = 0)¶
-
constexpr int mpl::any_source = MPI_ANY_SOURCE¶
Wildcard value to indicate in a receive operation, e.g.,
communicator::recv, that any source is acceptable.See also