Arcane  v3.16.0.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
IParallelDispatch.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/* IParallelDispatch.h (C) 2000-2018 */
9/* */
10/* Gestion des messages parallèles pour un type de valeur. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IPARALLELDISPATCH_H
13#define ARCANE_IPARALLELDISPATCH_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/ArcaneTypes.h"
18#include "arcane/Parallel.h"
19#include "arccore/message_passing/ITypeDispatcher.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24ARCANE_BEGIN_NAMESPACE
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
32template<class Type>
34{
35 public:
36 typedef Parallel::Request Request;
37 typedef Parallel::eReduceType eReduceType;
38 using PointToPointMessageInfo = Parallel::PointToPointMessageInfo;
39 public:
40 virtual ~IParallelDispatchT() {}
41 virtual void finalize() =0;
42 public:
43 virtual void broadcast(ArrayView<Type> send_buf,Int32 rank) =0;
44 virtual void allGather(ConstArrayView<Type> send_buf,ArrayView<Type> recv_buf) =0;
45 virtual void allGatherVariable(ConstArrayView<Type> send_buf,Array<Type>& recv_buf) =0;
46 virtual void gather(ConstArrayView<Type> send_buf,ArrayView<Type> recv_buf,Int32 rank) =0;
47 virtual void gatherVariable(ConstArrayView<Type> send_buf,Array<Type>& recv_buf,Int32 rank) =0;
48 virtual void scatterVariable(ConstArrayView<Type> send_buf,ArrayView<Type> recv_buf,Int32 root) =0;
49 virtual void allToAll(ConstArrayView<Type> send_buf,ArrayView<Type> recv_buf,Integer count) =0;
50 virtual void allToAllVariable(ConstArrayView<Type> send_buf,Int32ConstArrayView send_count,
51 Int32ConstArrayView send_index,ArrayView<Type> recv_buf,
52 Int32ConstArrayView recv_count,Int32ConstArrayView recv_index) =0;
53 virtual Type allReduce(eReduceType op,Type send_buf) =0;
54 virtual void allReduce(eReduceType op,ArrayView<Type> send_buf) =0;
55 public:
56 virtual Request send(ConstArrayView<Type> send_buffer,Int32 rank,bool is_blocked) =0;
57 virtual Request send(Span<const Type> recv_buffer,const PointToPointMessageInfo& message) =0;
58 virtual Request recv(ArrayView<Type> recv_buffer,Int32 rank,bool is_blocked) =0;
59 virtual Request receive(Span<Type> recv_buffer,const PointToPointMessageInfo& message) =0;
60 virtual void send(ConstArrayView<Type> send_buffer,Int32 rank) =0;
61 virtual void recv(ArrayView<Type> recv_buffer,Int32 rank) =0;
62 virtual void sendRecv(ConstArrayView<Type> send_buffer,ArrayView<Type> recv_buffer,Int32 proc) =0;
63 virtual Type scan(eReduceType op,Type send_buf) =0;
64 virtual void scan(eReduceType op,ArrayView<Type> send_buf) =0;
65 virtual void computeMinMaxSum(Type val,Type& min_val,Type& max_val,Type& sum_val,
66 Int32& min_rank,
67 Int32& max_rank) =0;
68 virtual void computeMinMaxSum(ConstArrayView<Type> values,
69 ArrayView<Type> min_values,
70 ArrayView<Type> max_values,
71 ArrayView<Type> sum_values,
72 ArrayView<Int32> min_ranks,
73 ArrayView<Int32> max_ranks) =0;
74 public:
75 virtual ITypeDispatcher<Type>* toArccoreDispatcher() =0;
76};
77
78/*---------------------------------------------------------------------------*/
79/*---------------------------------------------------------------------------*/
80
81ARCANE_END_NAMESPACE
82
83/*---------------------------------------------------------------------------*/
84/*---------------------------------------------------------------------------*/
85
86#endif
87
Vue modifiable d'un tableau d'un type T.
Tableau d'items de types quelconques.
Vue constante d'un tableau de type T.
Gestion des messages parallèles pour le type Type.
Gestion des messages parallèles pour le type Type.
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.
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.
Type
Type of JSON value.
Definition rapidjson.h:665