12#ifndef ARCCORE_MESSAGEPASSING_MESSAGES_H
13#define ARCCORE_MESSAGEPASSING_MESSAGES_H
17#include "arccore/message_passing/IMessagePassingMng.h"
18#include "arccore/message_passing/IDispatchers.h"
19#include "arccore/message_passing/ITypeDispatcher.h"
20#include "arccore/message_passing/Request.h"
34#define ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(type) \
36 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
37 mpAllGather(IMessagePassingMng* pm, Span<const type> send_buf, Span<type> recv_buf); \
39 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
40 mpGather(IMessagePassingMng* pm, Span<const type> send_buf, Span<type> recv_buf, Int32 rank); \
42 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
43 mpNonBlockingAllGather(IMessagePassingMng* pm, Span<const type> send_buf, Span<type> recv_buf); \
45 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
46 mpNonBlockingGather(IMessagePassingMng* pm, Span<const type> send_buf, Span<type> recv_buf, Int32 rank); \
48 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
49 mpAllGatherVariable(IMessagePassingMng* pm, Span<const type> send_buf, Array<type>& recv_buf); \
51 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
52 mpGatherVariable(IMessagePassingMng* pm, Span<const type> send_buf, Array<type>& recv_buf, Int32 rank); \
54 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
55 mpGather(IMessagePassingMng* pm, GatherMessageInfo<type>& gather_info); \
57 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
58 mpScatterVariable(IMessagePassingMng* pm, Span<const type> send_buf, Span<type> recv_buf, Int32 root); \
60 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT type \
61 mpAllReduce(IMessagePassingMng* pm, eReduceType rt, type v); \
63 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
64 mpAllReduce(IMessagePassingMng* pm, eReduceType rt, Span<type> buf); \
66 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
67 mpAllReduce(IMessagePassingMng* pm, eReduceType rt, Span<const type> send_buf, Span<type> receive_buf); \
69 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
70 mpScanExclusive(IMessagePassingMng* pm, eReduceType rt, Span<const type> send_buf, Span<type> receive_buf); \
72 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
73 mpNonBlockingAllReduce(IMessagePassingMng* pm, eReduceType rt, Span<const type> send_buf, Span<type> recv_buf); \
75 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
76 mpBroadcast(IMessagePassingMng* pm, Span<type> send_buf, Int32 rank); \
78 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
79 mpNonBlockingBroadcast(IMessagePassingMng* pm, Span<type> send_buf, Int32 rank); \
81 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
82 mpSend(IMessagePassingMng* pm, Span<const type> values, Int32 rank); \
84 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
85 mpReceive(IMessagePassingMng* pm, Span<type> values, Int32 rank); \
87 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
88 mpSend(IMessagePassingMng* pm, Span<const type> values, Int32 rank, bool is_blocked); \
90 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
91 mpSend(IMessagePassingMng* pm, Span<const type> values, const PointToPointMessageInfo& message); \
93 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
94 mpReceive(IMessagePassingMng* pm, Span<type> values, Int32 rank, bool is_blocked); \
96 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
97 mpReceive(IMessagePassingMng* pm, Span<type> values, const PointToPointMessageInfo& message); \
99 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
100 mpAllToAll(IMessagePassingMng* pm, Span<const type> send_buf, Span<type> recv_buf, Int32 count); \
102 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
103 mpNonBlockingAllToAll(IMessagePassingMng* pm, Span<const type> send_buf, Span<type> recv_buf, Int32 count); \
105 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
106 mpAllToAllVariable(IMessagePassingMng* pm, Span<const type> send_buf, ConstArrayView<Int32> send_count, \
107 ConstArrayView<Int32> send_index, Span<type> recv_buf, \
108 ConstArrayView<Int32> recv_count, ConstArrayView<Int32> recv_index); \
110 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
111 mpNonBlockingAllToAllVariable(IMessagePassingMng* pm, Span<const type> send_buf, ConstArrayView<Int32> send_count, \
112 ConstArrayView<Int32> send_index, Span<type> recv_buf, \
113 ConstArrayView<Int32> recv_count, ConstArrayView<Int32> recv_index);
122ARCCORE_MESSAGEPASSING_EXPORT Ref<IRequestList>
130ARCCORE_MESSAGEPASSING_EXPORT
void
138ARCCORE_MESSAGEPASSING_EXPORT
void
149ARCCORE_MESSAGEPASSING_EXPORT
void
160ARCCORE_MESSAGEPASSING_EXPORT
void
171ARCCORE_MESSAGEPASSING_EXPORT
void
173 ArrayView<bool> indexes,
eWaitType wait_type);
232ARCCORE_DEPRECATED_REASON(
"Y2026: Use mpSplitCommunicator() instead.")
256ARCCORE_MESSAGEPASSING_EXPORT
void
264ARCCORE_MESSAGEPASSING_EXPORT
Request
278ARCCORE_MESSAGEPASSING_EXPORT
Request
282ARCCORE_MESSAGEPASSING_EXPORT
Request
286ARCCORE_MESSAGEPASSING_EXPORT
void
336ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
char)
337ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
signed char)
338ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
unsigned char)
340ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
short)
341ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
unsigned short)
342ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
int)
343ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
unsigned int)
344ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
long)
345ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
unsigned long)
346ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
long long)
347ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
unsigned long long)
349ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
float)
350ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
double)
351ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
long double)
354ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
Float16)
356#undef ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE
Types et fonctions associés aux classes SpanImpl, SmallSpan et Span.
Type flottant demi-précision.
Interface du gestionnaire des échanges de messages.
Interface d'une liste de messages de sérialisation.
Informations sur la source d'un message.
Informations pour envoyer/recevoir un message point à point.
Déclarations des types et méthodes utilisés par les mécanismes d'échange de messages.
C void mpGather(IMessagePassingMng *pm, Span< const char > send_buf, Span< char > recv_buf, Int32 rank)
Ref< ISerializeMessage > mpCreateSerializeMessage(IMessagePassingMng *pm, MessageRank target, ePointToPointMessageType type)
Créé un message de sérialisation.
C void mpScatterVariable(IMessagePassingMng *pm, Span< const char > send_buf, Span< char > recv_buf, Int32 root)
C Request mpNonBlockingAllGather(IMessagePassingMng *pm, Span< const char > send_buf, Span< char > recv_buf)
C void mpBroadcast(IMessagePassingMng *pm, Span< char > send_buf, Int32 rank)
void mpTestSome(IMessagePassingMng *pm, ArrayView< Request > requests, ArrayView< bool > indexes)
Teste si des requêtes de request sont terminées.
Ref< ISerializeMessageList > mpCreateSerializeMessageListRef(IMessagePassingMng *pm)
Créé une liste de messages de sérialisation.
Ref< ISerializeMessage > mpCreateSendSerializeMessage(IMessagePassingMng *pm, MessageRank destination)
Créé un message de sérialisation en envoi.
MessageSourceInfo mpLegacyProbe(IMessagePassingMng *pm, const PointToPointMessageInfo &message)
Teste si un message est disponible.
Ref< IMessagePassingMng > mpSplitCommunicator(IMessagePassingMng *pm, bool keep)
Créé un sous-communicateur.
Ref< ISerializeMessage > mpCreateReceiveSerializeMessage(IMessagePassingMng *pm, MessageRank source)
Créé un message de sérialisation en envoi.
MessageId mpProbe(IMessagePassingMng *pm, const PointToPointMessageInfo &message)
Teste si un message est disponible.
C void mpAllToAll(IMessagePassingMng *pm, Span< const char > send_buf, Span< char > recv_buf, Int32 count)
C Request mpNonBlockingAllToAll(IMessagePassingMng *pm, Span< const char > send_buf, Span< char > recv_buf, Int32 count)
C void mpAllToAllVariable(IMessagePassingMng *pm, Span< const char > send_buf, ConstArrayView< Int32 > send_count, ConstArrayView< Int32 > send_index, Span< char > recv_buf, ConstArrayView< Int32 > recv_count, ConstArrayView< Int32 > recv_index)
C void mpGatherVariable(IMessagePassingMng *pm, Span< const char > send_buf, Array< char > &recv_buf, Int32 rank)
C char mpAllReduce(IMessagePassingMng *pm, eReduceType rt, char v)
Ref< IRequestList > mpCreateRequestListRef(IMessagePassingMng *pm)
Créé une liste de requêtes.
C void mpAllGatherVariable(IMessagePassingMng *pm, Span< const char > send_buf, Array< char > &recv_buf)
void mpBarrier(IMessagePassingMng *pm)
Effectue une barrière.
Request mpNonBlockingBarrier(IMessagePassingMng *pm)
Effectue une barrière non bloquante.
void mpWait(IMessagePassingMng *pm, Request request)
Bloque jusqu'à ce que la requête request soit terminée.
void mpAllGather(IMessagePassingMng *pm, const ISerializer *send_serializer, ISerializer *receive_serialize)
Message allGather() pour une sérialisation.
void mpWaitAll(IMessagePassingMng *pm, ArrayView< Request > requests)
Bloque tant que les requêtes de requests ne sont pas terminées.
IMessagePassingMng * mpSplit(IMessagePassingMng *pm, bool keep)
Créé un sous-communicateur.
C Request mpNonBlockingAllToAllVariable(IMessagePassingMng *pm, Span< const char > send_buf, ConstArrayView< Int32 > send_count, ConstArrayView< Int32 > send_index, Span< char > recv_buf, ConstArrayView< Int32 > recv_count, ConstArrayView< Int32 > recv_index)
ePointToPointMessageType
Type de message point à point.
C Request mpNonBlockingGather(IMessagePassingMng *pm, Span< const char > send_buf, Span< char > recv_buf, Int32 rank)
Request mpReceive(IMessagePassingMng *pm, ISerializer *values, const PointToPointMessageInfo &message)
Message de réception utilisant un ISerializer.
void mpWaitSome(IMessagePassingMng *pm, ArrayView< Request > requests, ArrayView< bool > indexes)
Bloque jusqu'à ce qu'au moins une des requêtes de request soit terminée.
C Request mpNonBlockingBroadcast(IMessagePassingMng *pm, Span< char > send_buf, Int32 rank)
Request mpSend(IMessagePassingMng *pm, const ISerializer *values, const PointToPointMessageInfo &message)
Message d'envoi utilisant un ISerializer.
C Request mpNonBlockingAllReduce(IMessagePassingMng *pm, eReduceType rt, Span< const char > send_buf, Span< char > recv_buf)
Espace de nommage contenant les types et déclarations qui gèrent le mécanisme de parallélisme par éch...