12#ifndef ARCCORE_MESSAGEPASSING_GATHERMESSAGEINFO_H
13#define ARCCORE_MESSAGEPASSING_GATHERMESSAGEINFO_H
17#include "arccore/collections/Array.h"
18#include "arccore/message_passing/MessageRank.h"
41 GatherVariableNeedComputeInfo,
52 : m_destination_rank(dest_rank)
57 : m_destination_rank(dest_rank)
58 , m_is_blocking(blocking_type == Blocking)
63 void setBlocking(
bool is_blocking)
65 m_is_blocking = is_blocking;
76 m_destination_rank = rank;
83 void print(std::ostream& o)
const;
96 if (m_mode == Mode::Null)
103 void _setType(Mode t)
110 MessageRank m_destination_rank;
111 bool m_is_blocking =
true;
112 Mode m_mode = Mode::Null;
124template <
typename DataType>
139 : BaseClass(dest_rank)
144 : BaseClass(dest_rank, blocking_type)
158 _setType(Mode::Gather);
159 m_receive_buf = receive_buf;
160 m_send_buffer = send_buf;
180 _setType(Mode::GatherVariableNeedComputeInfo);
181 m_local_reception_buffer = receive_array;
182 m_send_buffer = send_buf;
196 _setType(Mode::GatherVariable);
197 m_receive_buf = receive_buf;
198 m_send_buffer = send_buf;
199 m_receive_displacements = receive_displacements;
200 m_receive_counts = receive_counts;
Classe de base des vecteurs 1D de données.
Informations pour un message 'gather'.
GatherMessageInfoBase()=default
Message pout tout le monde et bloquant.
bool isBlocking() const
Indique si le message est bloquant.
void print(std::ostream &o) const
Affiche le message.
GatherMessageInfoBase(MessageRank dest_rank)
Message bloquant ayant pour destination rank.
void setDestinationRank(MessageRank rank)
Positionne le rang de la destination du message.
GatherMessageInfoBase(MessageRank dest_rank, eBlockingType blocking_type)
Message ayant pour destination dest_rank et mode bloquant blocking_type.
MessageRank destinationRank() const
Rang de la destination du message.
Mode mode() const
Mode du message.
Span< const DataType > sendBuffer() const
Buffer d'envoi. Il est utilisé dans tous les modes.
GatherMessageInfo()=default
Message pout tout le monde et bloquant.
Array< DataType > * localReceptionBuffer() const
Buffer de réception pour le type T_GatherVariableNeedComputeInfo.
GatherMessageInfo(MessageRank dest_rank, eBlockingType blocking_type)
Message ayant pour destination dest_rank et mode bloquant blocking_type.
Span< const Int32 > receiveCounts() const
Tableau des tailles. Utilisé en mode GatherVariable.
Span< DataType > receiveBuffer() const
Buffer de réception. Utilisé en mode Gather et GatherVariable par les rangs qui recoivent.
void setGatherVariable(Span< const DataType > send_buf, Array< DataType > *receive_array)
Message équivalent à MPI_Gatherv ou MPI_Allgatherv.
GatherMessageInfo(MessageRank dest_rank)
Message bloquant ayant pour destination rank.
void setGather(Span< const DataType > send_buf, Span< DataType > receive_buf)
Message équivalent à MPI_Gather ou MPI_Allgather.
Span< const Int32 > receiveDisplacement()
Tableau des déplacements. Utilisé en mode GatherVariable.
void setGatherVariable(Span< const DataType > send_buf, Span< DataType > receive_buf, Span< const Int32 > receive_counts, Span< const Int32 > receive_displacements)
Message équivalent à MPI_Gatherv ou MPI_Allgatherv.
Vue d'un tableau d'éléments de type T.
Déclarations des types et méthodes utilisés par les mécanismes d'échange de messages.
eBlockingType
Type indiquant si un message est bloquant ou non.