Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Parallel::PointToPointMessageInfo Class Reference

Information for sending/receiving a point-to-point message. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/message_passing/arccore/message_passing/PointToPointMessageInfo.h>

Collaboration diagram for Arcane::Parallel::PointToPointMessageInfo:

Public Types

enum class  Type { T_RankTag , T_MessageId , T_Null }

Public Member Functions

 PointToPointMessageInfo ()
 Null message.
 PointToPointMessageInfo (MessageRank dest_rank)
 Blocking message with default tag and destination rank rank.
 PointToPointMessageInfo (MessageRank dest_rank, eBlockingType blocking_type)
 Message with default tag, destination dest_rank, and blocking.
 PointToPointMessageInfo (MessageRank dest_rank, MessageTag tag)
 Blocking message with tag tag and destination rank.
 PointToPointMessageInfo (MessageRank dest_rank, MessageTag tag, eBlockingType blocking_type)
 Message with tag tag, destination dest_rank, and blocking.
 PointToPointMessageInfo (MessageId message_id)
 Blocking message associated with message_id.
 PointToPointMessageInfo (MessageId message_id, eBlockingType blocking_type)
 Message associated with message_id with blocking mode blocking_type.
 PointToPointMessageInfo (MessageRank emiter_rank, MessageRank dest_rank, eBlockingType blocking_type)
 Message with default tag and source emiter_rank, destination dest_rank, and blocking mode blocking_type.
 PointToPointMessageInfo (MessageRank emiter_rank, MessageRank dest_rank, MessageTag tag)
 Blocking message with tag tag, source emiter_rank, and destination rank.
 PointToPointMessageInfo (MessageRank emiter_rank, MessageRank dest_rank)
 Blocking message with default tag, source emiter_rank, and destination dest_rank.
 PointToPointMessageInfo (MessageRank emiter_rank, MessageRank dest_rank, MessageTag tag, eBlockingType blocking_type)
 Message with tag tag, source emiter_rank, destination dest_rank, and blocking mode blocking_type.
PointToPointMessageInfosetBlocking (bool is_blocking)
bool isBlocking () const
 Indicates if the message is blocking.
bool isMessageId () const
 True if the instance was created with a MessageId. In this case messageId() is valid.
bool isRankTag () const
 True if the instance was created with a pair (rank,tag). In this case rank() and tag() are valid.
MessageId messageId () const
 Message identifier.
void setMessageId (const MessageId &message_id)
 Positions the message identifier and changes the message type.
void setRankTag (MessageRank rank, MessageTag tag)
 Positions the message destination rank and tag and changes the message type.
MessageRank destinationRank () const
 Message destination rank.
void setDestinationRank (MessageRank rank)
 Positions the message destination rank.
MessageRank emiterRank () const
 Message sender rank.
void setEmiterRank (MessageRank rank)
 Positions the message sender rank.
MessageTag tag () const
 Message tag.
void setTag (MessageTag tag)
 Positions the message tag.
void print (std::ostream &o) const
 Prints the message.
bool isValid () const
MessageRank sourceRank () const
 Message origin rank.
void setSourceRank (MessageRank rank)
 Positions the message origin rank.

Private Member Functions

void _setInfosFromMessageId ()

Private Attributes

MessageRank m_emiter_rank
MessageRank m_destination_rank
MessageTag m_tag = MessageTag::defaultTag()
MessageId m_message_id
bool m_is_blocking = true
Type m_type = Type::T_Null

Friends

std::ostream & operator<< (std::ostream &o, const PointToPointMessageInfo &pmessage)

Detailed Description

Information for sending/receiving a point-to-point message.

There are two ways to construct an instance of this class:

  1. By providing a pair (destination rank, tag). The tag is optional and if not specified, its value will be that of MessageTag::defaultTag().
  2. Via a MessageId obtained during a call to mpProbe(). In this latter case, the instance can only be used for reception via mpReceive().

It is possible to specify whether the message will be blocking during construction or via the call to setBlocking(). By default, a message is created in blocking mode.

The sender (emiterRank()) of the message is the sender and the destination (destinationRank()) is the receiver. For a send message (mpSend()), destinationRank() is therefore the rank of the one who will receive the message. For a receive message (mpReceive()), destinationRank() is the rank of the one from whom we wish to receive the message or A_NULL_RANK if we wish to receive from anyone.

Note
The sender is generally positioned by the IMessagePassingMng implementation because it corresponds to the rank of the one posting the message. The user never needs to specify it.

Definition at line 55 of file PointToPointMessageInfo.h.

Member Enumeration Documentation

◆ Type

enum class Arcane::MessagePassing::PointToPointMessageInfo::Type
strong

Definition at line 59 of file PointToPointMessageInfo.h.

Constructor & Destructor Documentation

◆ PointToPointMessageInfo() [1/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( )
inline

Null message.

Definition at line 69 of file PointToPointMessageInfo.h.

◆ PointToPointMessageInfo() [2/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( MessageRank dest_rank)
inlineexplicit

Blocking message with default tag and destination rank rank.

Definition at line 72 of file PointToPointMessageInfo.h.

◆ PointToPointMessageInfo() [3/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( MessageRank dest_rank,
eBlockingType blocking_type )
inline

Message with default tag, destination dest_rank, and blocking.

Definition at line 79 of file PointToPointMessageInfo.h.

◆ PointToPointMessageInfo() [4/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( MessageRank dest_rank,
MessageTag tag )
inline

Blocking message with tag tag and destination rank.

Definition at line 86 of file PointToPointMessageInfo.h.

◆ PointToPointMessageInfo() [5/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( MessageRank dest_rank,
MessageTag tag,
eBlockingType blocking_type )
inline

Message with tag tag, destination dest_rank, and blocking.

Definition at line 94 of file PointToPointMessageInfo.h.

◆ PointToPointMessageInfo() [6/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( MessageId message_id)
inlineexplicit

Blocking message associated with message_id.

Definition at line 102 of file PointToPointMessageInfo.h.

◆ PointToPointMessageInfo() [7/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( MessageId message_id,
eBlockingType blocking_type )
inline

Message associated with message_id with blocking mode blocking_type.

Definition at line 110 of file PointToPointMessageInfo.h.

◆ PointToPointMessageInfo() [8/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( MessageRank emiter_rank,
MessageRank dest_rank,
eBlockingType blocking_type )
inline

Message with default tag and source emiter_rank, destination dest_rank, and blocking mode blocking_type.

Definition at line 125 of file PointToPointMessageInfo.h.

◆ PointToPointMessageInfo() [9/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( MessageRank emiter_rank,
MessageRank dest_rank,
MessageTag tag )
inline

Blocking message with tag tag, source emiter_rank, and destination rank.

Definition at line 134 of file PointToPointMessageInfo.h.

◆ PointToPointMessageInfo() [10/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( MessageRank emiter_rank,
MessageRank dest_rank )
inline

Blocking message with default tag, source emiter_rank, and destination dest_rank.

Definition at line 143 of file PointToPointMessageInfo.h.

◆ PointToPointMessageInfo() [11/11]

Arcane::MessagePassing::PointToPointMessageInfo::PointToPointMessageInfo ( MessageRank emiter_rank,
MessageRank dest_rank,
MessageTag tag,
eBlockingType blocking_type )
inline

Message with tag tag, source emiter_rank, destination dest_rank, and blocking mode blocking_type.

Definition at line 156 of file PointToPointMessageInfo.h.

Member Function Documentation

◆ _setInfosFromMessageId()

void Arcane::MessagePassing::PointToPointMessageInfo::_setInfosFromMessageId ( )
inlineprivate

Definition at line 263 of file PointToPointMessageInfo.h.

◆ destinationRank()

MessageRank Arcane::MessagePassing::PointToPointMessageInfo::destinationRank ( ) const
inline

Message destination rank.

Definition at line 196 of file PointToPointMessageInfo.h.

◆ emiterRank()

MessageRank Arcane::MessagePassing::PointToPointMessageInfo::emiterRank ( ) const
inline

Message sender rank.

Definition at line 207 of file PointToPointMessageInfo.h.

◆ isBlocking()

bool Arcane::MessagePassing::PointToPointMessageInfo::isBlocking ( ) const
inline

Indicates if the message is blocking.

Definition at line 172 of file PointToPointMessageInfo.h.

◆ isMessageId()

bool Arcane::MessagePassing::PointToPointMessageInfo::isMessageId ( ) const
inline

True if the instance was created with a MessageId. In this case messageId() is valid.

Definition at line 174 of file PointToPointMessageInfo.h.

◆ isRankTag()

bool Arcane::MessagePassing::PointToPointMessageInfo::isRankTag ( ) const
inline

True if the instance was created with a pair (rank,tag). In this case rank() and tag() are valid.

Definition at line 176 of file PointToPointMessageInfo.h.

◆ isValid()

bool Arcane::MessagePassing::PointToPointMessageInfo::isValid ( ) const
inline

Definition at line 233 of file PointToPointMessageInfo.h.

◆ messageId()

MessageId Arcane::MessagePassing::PointToPointMessageInfo::messageId ( ) const
inline

Message identifier.

Definition at line 178 of file PointToPointMessageInfo.h.

◆ print()

void Arcane::MessagePassing::PointToPointMessageInfo::print ( std::ostream & o) const

Prints the message.

Definition at line 27 of file PointToPointMessageInfo.cc.

◆ setBlocking()

PointToPointMessageInfo & Arcane::MessagePassing::PointToPointMessageInfo::setBlocking ( bool is_blocking)
inline

Definition at line 166 of file PointToPointMessageInfo.h.

◆ setDestinationRank()

void Arcane::MessagePassing::PointToPointMessageInfo::setDestinationRank ( MessageRank rank)
inline

Positions the message destination rank.

Definition at line 198 of file PointToPointMessageInfo.h.

◆ setEmiterRank()

void Arcane::MessagePassing::PointToPointMessageInfo::setEmiterRank ( MessageRank rank)
inline

Positions the message sender rank.

Definition at line 209 of file PointToPointMessageInfo.h.

◆ setMessageId()

void Arcane::MessagePassing::PointToPointMessageInfo::setMessageId ( const MessageId & message_id)
inline

Positions the message identifier and changes the message type.

Definition at line 180 of file PointToPointMessageInfo.h.

◆ setRankTag()

void Arcane::MessagePassing::PointToPointMessageInfo::setRankTag ( MessageRank rank,
MessageTag tag )
inline

Positions the message destination rank and tag and changes the message type.

Definition at line 187 of file PointToPointMessageInfo.h.

◆ setSourceRank()

void Arcane::MessagePassing::PointToPointMessageInfo::setSourceRank ( MessageRank rank)
inline

Positions the message origin rank.

Definition at line 252 of file PointToPointMessageInfo.h.

◆ setTag()

void Arcane::MessagePassing::PointToPointMessageInfo::setTag ( MessageTag tag)
inline

Positions the message tag.

Definition at line 214 of file PointToPointMessageInfo.h.

◆ sourceRank()

MessageRank Arcane::MessagePassing::PointToPointMessageInfo::sourceRank ( ) const
inline

Message origin rank.

Definition at line 248 of file PointToPointMessageInfo.h.

◆ tag()

MessageTag Arcane::MessagePassing::PointToPointMessageInfo::tag ( ) const
inline

Message tag.

Definition at line 212 of file PointToPointMessageInfo.h.

◆ operator<<

std::ostream & operator<< ( std::ostream & o,
const PointToPointMessageInfo & pmessage )
friend

Definition at line 224 of file PointToPointMessageInfo.h.

Member Data Documentation

◆ m_destination_rank

MessageRank Arcane::MessagePassing::PointToPointMessageInfo::m_destination_rank
private

Definition at line 257 of file PointToPointMessageInfo.h.

◆ m_emiter_rank

MessageRank Arcane::MessagePassing::PointToPointMessageInfo::m_emiter_rank
private

Definition at line 256 of file PointToPointMessageInfo.h.

◆ m_is_blocking

bool Arcane::MessagePassing::PointToPointMessageInfo::m_is_blocking = true
private

Definition at line 260 of file PointToPointMessageInfo.h.

◆ m_message_id

MessageId Arcane::MessagePassing::PointToPointMessageInfo::m_message_id
private

Definition at line 259 of file PointToPointMessageInfo.h.

◆ m_tag

MessageTag Arcane::MessagePassing::PointToPointMessageInfo::m_tag = MessageTag::defaultTag()
private

Definition at line 258 of file PointToPointMessageInfo.h.

◆ m_type

Type Arcane::MessagePassing::PointToPointMessageInfo::m_type = Type::T_Null
private

Definition at line 261 of file PointToPointMessageInfo.h.


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