Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::MessagePassing::BasicSerializeMessage Class Reference

Serializing message using a BasicSerializer. More...

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

Inheritance diagram for Arcane::MessagePassing::BasicSerializeMessage:
Collaboration diagram for Arcane::MessagePassing::BasicSerializeMessage:

Public Member Functions

BasicSerializeMessage & operator= (const BasicSerializeMessage &)=delete
 BasicSerializeMessage (const BasicSerializeMessage &)=delete
bool isSend () const override
 true if it should send, false if it should receive
eMessageType messageType () const override
 Message type.
Int32 destRank () const override
 Destination rank (if isSend() is true) or sender.
Int32 origRank () const override
 Message sender rank See also destRank() for interpretation based on the value of isSend().
MessageRank destination () const override
 Destination rank (if isSend() is true) or sender.
MessageRank source () const override
 Message sender rank.
ISerializerserializer () override
 Serializer.
bool finished () const override
 true if the message is finished
void setFinished (bool v) override
 Sets the 'finished' state of the message.
void setTag (Int32 tag) override
Int32 tag () const override
 Internal tag of the message.
void setInternalTag (MessageTag tag) override
 Sets an internal tag for the message.
MessageTag internalTag () const override
 Internal tag of the message.
MessageId _internalMessageId () const override
 Message identifier.
void setStrategy (eStrategy strategy) override
 Sets the sending/receiving strategy.
eStrategy strategy () const override
 Strategy used for sends/receives.
bool isProcessed () const override
 Indicates if the message has already been processed.
BasicSerializerbuffer ()
BasicSerializertrueSerializer () const
Int32 messageNumber () const
void setMessageNumber (Int32 v)
void setIsProcessed (bool v)
ePointToPointMessageType _internalMessageType () const
Public Member Functions inherited from Arcane::MessagePassing::ISerializeMessage
virtual ~ISerializeMessage ()=default
 Releases resources.

Static Public Member Functions

static MessageTag defaultTag ()
 Default tag for serialization messages.
static Ref< ISerializeMessagecreate (MessageRank source, MessageRank destination, ePointToPointMessageType type)
static Ref< ISerializeMessagecreate (MessageRank source, MessageRank destination, MessageTag tag, ePointToPointMessageType type)
static Ref< ISerializeMessagecreate (MessageRank source, MessageId message_id)

Static Public Attributes

static const Int32 DEFAULT_SERIALIZE_TAG_VALUE = 101

Protected Member Functions

 BasicSerializeMessage (MessageRank orig_rank, MessageRank dest_rank, ePointToPointMessageType mtype)
 BasicSerializeMessage (MessageRank orig_rank, MessageRank dest_rank, MessageTag tag, ePointToPointMessageType mtype)
 BasicSerializeMessage (MessageRank orig_rank, MessageRank dest_rank, ePointToPointMessageType type, BasicSerializer *serializer)
 BasicSerializeMessage (MessageRank orig_rank, MessageRank dest_rank, MessageTag tag, ePointToPointMessageType type, BasicSerializer *serializer)
 BasicSerializeMessage (MessageRank orig_rank, MessageId message_id, BasicSerializer *serializer)

Static Protected Member Functions

static ePointToPointMessageType _toP2PType (eMessageType mtype)
static eMessageType _toMessageType (ePointToPointMessageType mtype)

Private Member Functions

void _init ()

Private Attributes

MessageRank m_orig_rank
 Rank of the request sender.
MessageRank m_dest_rank
 Rank of the message recipient.
MessageTag m_tag = defaultTag()
eMessageType m_old_message_type
 Message type (obsolete).
ePointToPointMessageType m_message_type
 Message type.
eStrategy m_strategy = eStrategy::Default
bool m_is_send
 true if sending, false if receiving
BasicSerializerm_buffer = nullptr
 Buffer containing the info.
bool m_finished = false
 true if message finished
MessageId m_message_id
 Associated MessageId (can be null).
Int32 m_message_number = 0
bool m_is_processed = false
 Message number when using multiple messages.

Additional Inherited Members

Public Types inherited from Arcane::MessagePassing::ISerializeMessage
enum  eMessageType { MT_Send , MT_Recv , MT_Broadcast }
enum class  eStrategy { Default , OneMessage }
 Sending/receiving strategy. More...

Detailed Description

Serializing message using a BasicSerializer.

This class is internal to Arccore and should not be used directly. If you want to create an instance of ISerializeMessage, you must create a list of messages via ISerializeMessageList::createMessage();

A message consists of a series of bytes sent or received from a rank (source()) to another (destination()). If isSend() is true, source() sends bytes to destination(), otherwise source() receives bytes from destination(). If it is a reception message, the serializer() is allocated and filled automatically.

Definition at line 49 of file BasicSerializeMessage.h.

Constructor & Destructor Documentation

◆ ~BasicSerializeMessage()

Arcane::MessagePassing::internal::BasicSerializeMessage::~BasicSerializeMessage ( )
override

Definition at line 126 of file BasicSerializeMessage.cc.

◆ BasicSerializeMessage() [1/5]

Arcane::MessagePassing::internal::BasicSerializeMessage::BasicSerializeMessage ( MessageRank orig_rank,
MessageRank dest_rank,
ePointToPointMessageType mtype )
protected

Definition at line 116 of file BasicSerializeMessage.cc.

◆ BasicSerializeMessage() [2/5]

Arcane::MessagePassing::internal::BasicSerializeMessage::BasicSerializeMessage ( MessageRank orig_rank,
MessageRank dest_rank,
MessageTag tag,
ePointToPointMessageType mtype )
protected

Definition at line 106 of file BasicSerializeMessage.cc.

◆ BasicSerializeMessage() [3/5]

Arcane::MessagePassing::internal::BasicSerializeMessage::BasicSerializeMessage ( MessageRank orig_rank,
MessageRank dest_rank,
ePointToPointMessageType type,
BasicSerializer * serializer )
protected

Definition at line 77 of file BasicSerializeMessage.cc.

◆ BasicSerializeMessage() [4/5]

Arcane::MessagePassing::internal::BasicSerializeMessage::BasicSerializeMessage ( MessageRank orig_rank,
MessageRank dest_rank,
MessageTag tag,
ePointToPointMessageType type,
BasicSerializer * serializer )
protected

Definition at line 59 of file BasicSerializeMessage.cc.

◆ BasicSerializeMessage() [5/5]

Arcane::MessagePassing::internal::BasicSerializeMessage::BasicSerializeMessage ( MessageRank orig_rank,
MessageId message_id,
BasicSerializer * serializer )
protected

Definition at line 88 of file BasicSerializeMessage.cc.

Member Function Documentation

◆ _init()

void Arcane::MessagePassing::internal::BasicSerializeMessage::_init ( )
private

Definition at line 135 of file BasicSerializeMessage.cc.

◆ _internalMessageId()

◆ _internalMessageType()

ePointToPointMessageType Arcane::MessagePassing::internal::BasicSerializeMessage::_internalMessageType ( ) const
inline

Definition at line 119 of file BasicSerializeMessage.h.

◆ _toMessageType()

ISerializeMessage::eMessageType Arcane::MessagePassing::internal::BasicSerializeMessage::_toMessageType ( ePointToPointMessageType mtype)
staticprotected

Definition at line 44 of file BasicSerializeMessage.cc.

◆ _toP2PType()

ePointToPointMessageType Arcane::MessagePassing::internal::BasicSerializeMessage::_toP2PType ( eMessageType mtype)
staticprotected

Definition at line 27 of file BasicSerializeMessage.cc.

◆ buffer()

BasicSerializer & Arcane::MessagePassing::internal::BasicSerializeMessage::buffer ( )
inline

Definition at line 114 of file BasicSerializeMessage.h.

◆ create() [1/3]

Ref< ISerializeMessage > Arcane::MessagePassing::internal::BasicSerializeMessage::create ( MessageRank source,
MessageId message_id )
static

Definition at line 184 of file BasicSerializeMessage.cc.

◆ create() [2/3]

Ref< ISerializeMessage > Arcane::MessagePassing::internal::BasicSerializeMessage::create ( MessageRank source,
MessageRank destination,
ePointToPointMessageType type )
static

Definition at line 174 of file BasicSerializeMessage.cc.

◆ create() [3/3]

Ref< ISerializeMessage > Arcane::MessagePassing::internal::BasicSerializeMessage::create ( MessageRank source,
MessageRank destination,
MessageTag tag,
ePointToPointMessageType type )
static

Definition at line 163 of file BasicSerializeMessage.cc.

◆ defaultTag()

Default tag for serialization messages.

Definition at line 57 of file BasicSerializeMessage.h.

◆ destination()

Destination rank (if isSend() is true) or sender.

In the case of a reception, the rank can be null to indicate that you wish to receive from anyone. rank by specifying A_NULL_RANK.

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 98 of file BasicSerializeMessage.h.

◆ destRank()

Destination rank (if isSend() is true) or sender.

In the case of a reception, it is possible to specify any rank by specifying A_NULL_RANK.

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 96 of file BasicSerializeMessage.h.

◆ finished()

true if the message is finished

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 101 of file BasicSerializeMessage.h.

◆ internalTag()

◆ isProcessed()

Indicates if the message has already been processed.

If the message has already been processed, it is not possible to change certain characteristics (such as the strategy or the tag)

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 110 of file BasicSerializeMessage.h.

◆ isSend()

true if it should send, false if it should receive

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 94 of file BasicSerializeMessage.h.

◆ messageNumber()

Int32 Arcane::MessagePassing::internal::BasicSerializeMessage::messageNumber ( ) const
inline

Definition at line 116 of file BasicSerializeMessage.h.

◆ messageType()

eMessageType Arcane::MessagePassing::internal::BasicSerializeMessage::messageType ( ) const
inlineoverridevirtual

Message type.

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 95 of file BasicSerializeMessage.h.

◆ origRank()

Message sender rank See also destRank() for interpretation based on the value of isSend().

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 97 of file BasicSerializeMessage.h.

◆ serializer()

◆ setFinished()

Sets the 'finished' state of the message.

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 102 of file BasicSerializeMessage.h.

◆ setInternalTag()

Sets an internal tag for the message.

This tag is useful if multiple messages need to be sent/received to the same origin/destination pair.

This method is internal to Arccore.

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 105 of file BasicSerializeMessage.h.

◆ setIsProcessed()

void Arcane::MessagePassing::internal::BasicSerializeMessage::setIsProcessed ( bool v)
inline

Definition at line 118 of file BasicSerializeMessage.h.

◆ setMessageNumber()

void Arcane::MessagePassing::internal::BasicSerializeMessage::setMessageNumber ( Int32 v)
inline

Definition at line 117 of file BasicSerializeMessage.h.

◆ setStrategy()

Sets the sending/receiving strategy.

The strategy used must be the same for the sent message and the receive message, otherwise the behavior is undefined.

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 152 of file BasicSerializeMessage.cc.

◆ setTag()

◆ source()

Message sender rank.

See also destination() for interpretation based on the value of isSend()

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 99 of file BasicSerializeMessage.h.

◆ strategy()

Strategy used for sends/receives.

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 109 of file BasicSerializeMessage.h.

◆ tag()

Internal tag of the message.

Implements Arcane::MessagePassing::ISerializeMessage.

Definition at line 104 of file BasicSerializeMessage.h.

◆ trueSerializer()

BasicSerializer * Arcane::MessagePassing::internal::BasicSerializeMessage::trueSerializer ( ) const
inline

Definition at line 115 of file BasicSerializeMessage.h.

Member Data Documentation

◆ DEFAULT_SERIALIZE_TAG_VALUE

const Int32 Arcane::MessagePassing::internal::BasicSerializeMessage::DEFAULT_SERIALIZE_TAG_VALUE = 101
static

Definition at line 54 of file BasicSerializeMessage.h.

◆ m_buffer

Buffer containing the info.

Definition at line 135 of file BasicSerializeMessage.h.

◆ m_dest_rank

Rank of the message recipient.

Definition at line 129 of file BasicSerializeMessage.h.

◆ m_finished

true if message finished

Definition at line 136 of file BasicSerializeMessage.h.

◆ m_is_processed

Message number when using multiple messages.

Definition at line 139 of file BasicSerializeMessage.h.

◆ m_is_send

true if sending, false if receiving

Definition at line 134 of file BasicSerializeMessage.h.

◆ m_message_id

◆ m_message_number

Int32 Arcane::MessagePassing::internal::BasicSerializeMessage::m_message_number = 0
private

Definition at line 138 of file BasicSerializeMessage.h.

◆ m_message_type

◆ m_old_message_type

Message type (obsolete).

Definition at line 131 of file BasicSerializeMessage.h.

◆ m_orig_rank

◆ m_strategy

eStrategy Arcane::MessagePassing::internal::BasicSerializeMessage::m_strategy = eStrategy::Default
private

Definition at line 133 of file BasicSerializeMessage.h.

◆ m_tag

MessageTag Arcane::MessagePassing::internal::BasicSerializeMessage::m_tag = defaultTag()
private

Definition at line 130 of file BasicSerializeMessage.h.


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