Arcane
v3.14.10.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-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
24
ARCANE_BEGIN_NAMESPACE
25
26
/*---------------------------------------------------------------------------*/
27
/*---------------------------------------------------------------------------*/
28
/*!
29
* \internal
30
* \brief Gestion des messages parallèles pour le type \a Type.
31
*/
32
template
<
class
Type>
33
class
IParallelDispatchT
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
81
ARCANE_END_NAMESPACE
82
83
/*---------------------------------------------------------------------------*/
84
/*---------------------------------------------------------------------------*/
85
86
#endif
87
Arcane::IParallelDispatchT
Definition
IParallelDispatch.h:34
Arccore::ArrayView
Vue modifiable d'un tableau d'un type T.
Definition
arccore/src/base/arccore/base/ArrayView.h:94
Arccore::Array
Classe de base des vecteurs 1D de données.
Definition
arccore/src/collections/arccore/collections/Array.h:988
Arccore::ConstArrayView
Vue constante d'un tableau de type T.
Definition
arccore/src/base/arccore/base/ArrayView.h:533
Arccore::MessagePassing::ITypeDispatcher
Definition
ITypeDispatcher.h:38
Arccore::MessagePassing::PointToPointMessageInfo
Informations pour envoyer/recevoir un message point à point.
Definition
PointToPointMessageInfo.h:52
Arccore::MessagePassing::Request
Requête d'un message.
Definition
Request.h:77
Arccore::Span
Vue d'un tableau d'éléments de type T.
Definition
Span.h:510
Arccore::MessagePassing::eReduceType
eReduceType
Types des réductions supportées.
Definition
MessagePassingGlobal.h:88
arcane
core
IParallelDispatch.h
Généré le Lundi 18 Novembre 2024 02:56:48 pour Arcane par
1.9.8