Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
SerializeMessageList.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* SerializeMessageList.h (C) 2000-2020 */
9/* */
10/* Liste de messages de sérialisation. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_MESSAGEPASSING_SERIALIZEMESSAGEMESSAGELIST_H
13#define ARCCORE_MESSAGEPASSING_SERIALIZEMESSAGEMESSAGELIST_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/message_passing/ISerializeMessageList.h"
18
19#include "arccore/message_passing/PointToPointMessageInfo.h"
20#include "arccore/base/Ref.h"
21#include "arccore/trace/TimeMetric.h"
22#include "arccore/collections/Array.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arccore::MessagePassing::internal
28{
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
39class ARCCORE_MESSAGEPASSING_EXPORT SerializeMessageList
41{
43
44 struct ProbeInfo
45 {
46 public:
47 ProbeInfo() = default;
49 : m_serialize_message(sm), m_message_info(message_info){}
50 public:
51 BasicSerializeMessage* m_serialize_message = nullptr;
52 PointToPointMessageInfo m_message_info;
53 bool m_is_probe_done = false;
54 };
55
56 public:
57
59
60 public:
61
62 void addMessage(ISerializeMessage* msg) override;
63 void processPendingMessages() override;
64 Integer waitMessages(eWaitType wait_type) override;
66 createAndAddMessage(MessageRank destination,ePointToPointMessageType type) override;
67
68 void setAllowAnyRankReceive(bool v) { m_allow_any_rank_receive = v; }
69
70 private:
71
72 IMessagePassingMng* m_message_passing_mng = nullptr;
73 SerializeMessageContainer m_messages_to_process;
74 Ref<IRequestList> m_request_list;
75 SerializeMessageContainer m_messages_serialize;
76 SerializeMessageContainer m_remaining_serialize_messages;
77 UniqueArray<ProbeInfo> m_messages_to_probe;
78 bool m_allow_any_rank_receive = true;
79 TimeMetricAction m_message_passing_phase;
80
81 Integer _waitMessages(eWaitType wait_type);
82 void _addMessage(BasicSerializeMessage* sm,const PointToPointMessageInfo& message_info);
83 PointToPointMessageInfo buildMessageInfo(ISerializeMessage* sm);
84 void _doProbe();
85};
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
90} // End namespace Arccore::MessagePassing::internal
91
92/*---------------------------------------------------------------------------*/
93/*---------------------------------------------------------------------------*/
94
95#endif
96
Gestion des références à une classe C++.
Interface du gestionnaire des échanges de messages.
Informations pour envoyer/recevoir un message point à point.
Message de sérialisation utilisant un BasicSerializer.
Référence à une instance.
ePointToPointMessageType
Type de message point à point.
Int32 Integer
Type représentant un entier.