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"
23#include "arccore/base/Span.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 Request \
67 mpNonBlockingAllReduce(IMessagePassingMng* pm, eReduceType rt, Span<const type> send_buf, Span<type> recv_buf); \
69 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
70 mpBroadcast(IMessagePassingMng* pm, Span<type> send_buf, Int32 rank); \
72 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
73 mpNonBlockingBroadcast(IMessagePassingMng* pm, Span<type> send_buf, Int32 rank); \
75 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
76 mpSend(IMessagePassingMng* pm, Span<const type> values, Int32 rank); \
78 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
79 mpReceive(IMessagePassingMng* pm, Span<type> values, Int32 rank); \
81 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
82 mpSend(IMessagePassingMng* pm, Span<const type> values, Int32 rank, bool is_blocked); \
84 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
85 mpSend(IMessagePassingMng* pm, Span<const type> values, const PointToPointMessageInfo& message); \
87 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
88 mpReceive(IMessagePassingMng* pm, Span<type> values, Int32 rank, bool is_blocked); \
90 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
91 mpReceive(IMessagePassingMng* pm, Span<type> values, const PointToPointMessageInfo& message); \
93 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
94 mpAllToAll(IMessagePassingMng* pm, Span<const type> send_buf, Span<type> recv_buf, Int32 count); \
96 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
97 mpNonBlockingAllToAll(IMessagePassingMng* pm, Span<const type> send_buf, Span<type> recv_buf, Int32 count); \
99 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void \
100 mpAllToAllVariable(IMessagePassingMng* pm, Span<const type> send_buf, ConstArrayView<Int32> send_count, \
101 ConstArrayView<Int32> send_index, Span<type> recv_buf, \
102 ConstArrayView<Int32> recv_count, ConstArrayView<Int32> recv_index); \
104 extern "C++" ARCCORE_MESSAGEPASSING_EXPORT Request \
105 mpNonBlockingAllToAllVariable(IMessagePassingMng* pm, Span<const type> send_buf, ConstArrayView<Int32> send_count, \
106 ConstArrayView<Int32> send_index, Span<type> recv_buf, \
107 ConstArrayView<Int32> recv_count, ConstArrayView<Int32> recv_index);
116ARCCORE_MESSAGEPASSING_EXPORT Ref<IRequestList>
124ARCCORE_MESSAGEPASSING_EXPORT
void
132ARCCORE_MESSAGEPASSING_EXPORT
void
143ARCCORE_MESSAGEPASSING_EXPORT
void
154ARCCORE_MESSAGEPASSING_EXPORT
void
165ARCCORE_MESSAGEPASSING_EXPORT
void
167 ArrayView<bool> indexes,
eWaitType wait_type);
233ARCCORE_MESSAGEPASSING_EXPORT
void
241ARCCORE_MESSAGEPASSING_EXPORT
Request
251ARCCORE_MESSAGEPASSING_EXPORT Ref<ISerializeMessageList>
255ARCCORE_MESSAGEPASSING_EXPORT
Request
259ARCCORE_MESSAGEPASSING_EXPORT
Request
263ARCCORE_MESSAGEPASSING_EXPORT
void
269ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
char)
270ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
signed char)
271ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
unsigned char)
273ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
short)
274ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
unsigned short)
275ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
int)
276ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
unsigned int)
277ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
long)
278ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
unsigned long)
279ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
long long)
280ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
unsigned long long)
282ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
float)
283ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
double)
284ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
long double)
287ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE(
Float16)
289#undef ARCCORE_GENERATE_MESSAGEPASSING_PROTOTYPE
Type flottant demi-précision.
Interface du gestionnaire des échanges de messages.
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)
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.
MessageSourceInfo mpLegacyProbe(IMessagePassingMng *pm, const PointToPointMessageInfo &message)
Teste si un message est disponible.
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éé une nouvelle instance de IMessagePassingMng.
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)
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...