14#include "arccore/message_passing/BasicSerializeMessage.h"
15#include "arccore/base/FatalErrorException.h"
21namespace Arccore::MessagePassing::internal
28_toP2PType(eMessageType mtype)
31 case MT_Send:
return MsgSend;
32 case MT_Recv:
return MsgReceive;
33 case MT_Broadcast:
return MsgSend;
35 ARCCORE_FATAL(
"Unsupported value '{0}'",mtype);
41ISerializeMessage::eMessageType BasicSerializeMessage::
45 case MsgSend:
return MT_Send;
46 case MsgReceive:
return MT_Recv;
48 ARCCORE_FATAL(
"Unsupported value '{0}'",type);
54BasicSerializeMessage::
55BasicSerializeMessage(MessageRank orig_rank,MessageRank dest_rank,
58: m_orig_rank(orig_rank)
59, m_dest_rank(dest_rank)
61, m_old_message_type(_toMessageType(type))
72BasicSerializeMessage::
73BasicSerializeMessage(MessageRank orig_rank,MessageRank dest_rank,
74 ePointToPointMessageType type,
76: BasicSerializeMessage(orig_rank,dest_rank,defaultTag(),type,s)
83BasicSerializeMessage::
84BasicSerializeMessage(MessageRank orig_rank,MessageId message_id,
86: m_orig_rank(orig_rank)
87, m_dest_rank(message_id.sourceInfo().rank())
88, m_tag(message_id.sourceInfo().tag())
89, m_old_message_type(MT_Recv)
90, m_message_type(MsgReceive)
93, m_message_id(message_id)
101BasicSerializeMessage::
102BasicSerializeMessage(MessageRank orig_rank,MessageRank dest_rank,
103 MessageTag tag,ePointToPointMessageType type)
104: BasicSerializeMessage(orig_rank,dest_rank,tag,type,new BasicSerializer())
111BasicSerializeMessage::
112BasicSerializeMessage(MessageRank orig_rank,MessageRank dest_rank,
113 ePointToPointMessageType type)
114: BasicSerializeMessage(orig_rank,dest_rank,defaultTag(),type)
121BasicSerializeMessage::
122~BasicSerializeMessage()
130void BasicSerializeMessage::
133 switch(m_old_message_type){
147void BasicSerializeMessage::
151 ARCCORE_FATAL(
"Can not change strategy if isProcessed() is true");
152 m_strategy = strategy;
180create(MessageRank source,MessageId message_id)
182 ISerializeMessage* m =
new BasicSerializeMessage(source,message_id,
new BasicSerializer());
Gestion des références à une classe C++.
Implémentation basique de 'ISerializer'.
Interface d'un message de sérialisation entre IMessagePassingMng.
eStrategy
Stratégie d'envoi/réception.
Message de sérialisation utilisant un BasicSerializer.
Référence à une instance.
ePointToPointMessageType
Type de message point à point.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Créé une référence sur un pointeur.