Arcane  v3.16.4.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
IParallelDispatch.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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/* IParallelDispatch.h (C) 2000-2025 */
9/* */
10/* Gestion des messages parallèles pour un type de valeur. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IPARALLELDISPATCH_H
13#define ARCANE_CORE_IPARALLELDISPATCH_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
19#include "arccore/message_passing/ITypeDispatcher.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29/*!
30 * \internal
31 * \brief Gestion des messages parallèles pour le type \a Type.
32 */
33template <class Type>
35{
36 public:
37
38 using Request = Parallel::Request;
39 using eReduceType = Parallel::eReduceType;
40 using PointToPointMessageInfo = Parallel::PointToPointMessageInfo;
41
42 public:
43
44 virtual ~IParallelDispatchT() = default;
45
46 public:
47
48 virtual void finalize() = 0;
49
50 public:
51
52 virtual void broadcast(ArrayView<Type> send_buf, Int32 rank) = 0;
53 virtual void allGather(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf) = 0;
54 virtual void allGatherVariable(ConstArrayView<Type> send_buf, Array<Type>& recv_buf) = 0;
55 virtual void gather(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf, Int32 rank) = 0;
56 virtual void gatherVariable(ConstArrayView<Type> send_buf, Array<Type>& recv_buf, Int32 rank) = 0;
57 virtual void scatterVariable(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf, Int32 root) = 0;
58 virtual void allToAll(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf, Integer count) = 0;
59 virtual void allToAllVariable(ConstArrayView<Type> send_buf, Int32ConstArrayView send_count,
60 Int32ConstArrayView send_index, ArrayView<Type> recv_buf,
61 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
62 virtual Type allReduce(eReduceType op, Type send_buf) = 0;
63 virtual void allReduce(eReduceType op, ArrayView<Type> send_buf) = 0;
64
65 public:
66
67 virtual Request send(ConstArrayView<Type> send_buffer, Int32 rank, bool is_blocked) = 0;
68 virtual Request send(Span<const Type> recv_buffer, const PointToPointMessageInfo& message) = 0;
69 virtual Request recv(ArrayView<Type> recv_buffer, Int32 rank, bool is_blocked) = 0;
70 virtual Request receive(Span<Type> recv_buffer, const PointToPointMessageInfo& message) = 0;
71 virtual void send(ConstArrayView<Type> send_buffer, Int32 rank) = 0;
72 virtual void recv(ArrayView<Type> recv_buffer, Int32 rank) = 0;
73 virtual void sendRecv(ConstArrayView<Type> send_buffer, ArrayView<Type> recv_buffer, Int32 proc) = 0;
74 virtual Type scan(eReduceType op, Type send_buf) = 0;
75 virtual void scan(eReduceType op, ArrayView<Type> send_buf) = 0;
76 virtual void computeMinMaxSum(Type val, Type& min_val, Type& max_val, Type& sum_val,
77 Int32& min_rank,
78 Int32& max_rank) = 0;
79 virtual void computeMinMaxSum(ConstArrayView<Type> values,
80 ArrayView<Type> min_values,
81 ArrayView<Type> max_values,
82 ArrayView<Type> sum_values,
83 ArrayView<Int32> min_ranks,
84 ArrayView<Int32> max_ranks) = 0;
85
86 public:
87
88 virtual ITypeDispatcher<Type>* toArccoreDispatcher() = 0;
89};
90
91/*---------------------------------------------------------------------------*/
92/*---------------------------------------------------------------------------*/
93
94} // namespace Arcane
95
96/*---------------------------------------------------------------------------*/
97/*---------------------------------------------------------------------------*/
98
99#endif
100
Déclarations des types généraux de Arcane.
Fichier contenant les déclarations concernant le modèle de programmation par échange de message.
Vue modifiable d'un tableau d'un type T.
Classe de base des vecteurs 1D de données.
Vue constante d'un tableau de type T.
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:513
eReduceType
Types des réductions supportées.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.
ConstArrayView< Int32 > Int32ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 32 bits.
Definition UtilsTypes.h:569
std::int32_t Int32
Type entier signé sur 32 bits.