Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
ITypeDispatcher.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/* ITypeDispatcher.h (C) 2000-2022 */
9/* */
10/* Gestion des messages pour un type de données. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_MESSAGEPASSING_ITYPEDISPATCHER_H
13#define ARCCORE_MESSAGEPASSING_ITYPEDISPATCHER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18#include "arccore/message_passing/Request.h"
19#include "arccore/collections/CollectionsGlobal.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
26{
27extern "C++" ARCCORE_MESSAGEPASSING_EXPORT void
28_internalThrowNotImplementedTypeDispatcher ARCCORE_NORETURN ();
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32/*!
33 * \internal
34 * \brief Gestion des messages parallèles pour le type \a Type.
35 */
36template <class Type>
38{
39 public:
40
41 virtual ~ITypeDispatcher() = default;
42 virtual void finalize() = 0;
43
44 public:
45
46 virtual void broadcast(Span<Type> send_buf, Int32 rank) = 0;
47 virtual void allGather(Span<const Type> send_buf, Span<Type> recv_buf) = 0;
48 virtual void allGatherVariable(Span<const Type> send_buf, Array<Type>& recv_buf) = 0;
49 virtual void gather(Span<const Type> send_buf, Span<Type> recv_buf, Int32 rank) = 0;
50 virtual void gatherVariable(Span<const Type> send_buf, Array<Type>& recv_buf, Int32 rank) = 0;
51 virtual void scatterVariable(Span<const Type> send_buf, Span<Type> recv_buf, Int32 root) = 0;
52 virtual void allToAll(Span<const Type> send_buf, Span<Type> recv_buf, Int32 count) = 0;
53 virtual void allToAllVariable(Span<const Type> send_buf, ConstArrayView<Int32> send_count,
54 ConstArrayView<Int32> send_index, Span<Type> recv_buf,
55 ConstArrayView<Int32> recv_count, ConstArrayView<Int32> recv_index) = 0;
56 virtual Request send(Span<const Type> send_buffer, Int32 rank, bool is_blocked) = 0;
57 virtual Request send(Span<const Type> send_buffer, const PointToPointMessageInfo& message) = 0;
58 virtual Request receive(Span<Type> recv_buffer, Int32 rank, bool is_blocked) = 0;
59 virtual Request receive(Span<Type> recv_buffer, const PointToPointMessageInfo& message) = 0;
60 virtual Type allReduce(eReduceType op, Type send_buf) = 0;
61 virtual void allReduce(eReduceType op, Span<Type> send_buf) = 0;
62 virtual Request nonBlockingAllReduce(eReduceType op, Span<const Type> send_buf, Span<Type> recv_buf) = 0;
63 virtual Request nonBlockingAllGather(Span<const Type> send_buf, Span<Type> recv_buf) = 0;
64 virtual Request nonBlockingBroadcast(Span<Type> send_buf, Int32 rank) = 0;
65 virtual Request nonBlockingGather(Span<const Type> send_buf, Span<Type> recv_buf, Int32 rank) = 0;
66 virtual Request nonBlockingAllToAll(Span<const Type> send_buf, Span<Type> recv_buf, Int32 count) = 0;
67 virtual Request nonBlockingAllToAllVariable(Span<const Type> send_buf, ConstArrayView<Int32> send_count,
68 ConstArrayView<Int32> send_index, Span<Type> recv_buf,
69 ConstArrayView<Int32> recv_count, ConstArrayView<Int32> recv_index) = 0;
70 virtual Request gather(GatherMessageInfo<Type>&)
71 {
72 _internalThrowNotImplementedTypeDispatcher();
73 }
74};
75
76/*---------------------------------------------------------------------------*/
77/*---------------------------------------------------------------------------*/
78
79} // End namespace Arccore::MessagePassing
80
81/*---------------------------------------------------------------------------*/
82/*---------------------------------------------------------------------------*/
83
84#endif
Déclarations des types de la composante 'base' de Arccore.
Déclarations générales de la composante 'message_passing'.
Classe de base des vecteurs 1D de données.
Vue constante d'un tableau de type T.
Informations pour un message 'gather' pour le type de données DataType.
Informations pour envoyer/recevoir un message point à point.
Requête d'un message.
Definition Request.h:77
Vue d'un tableau d'éléments de type T.
Definition Span.h:510
Espace de nommage contenant les types et déclarations qui gèrent le mécanisme de parallélisme par éch...
eReduceType
Types des réductions supportées.
std::int32_t Int32
Type entier signé sur 32 bits.