Arcane
v3.15.3.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::ConstArrayView
Vue constante d'un tableau de type T.
Definition
arccore/src/base/arccore/base/ArrayView.h:533
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::Ref
Référence à une instance.
Definition
arccore/src/base/arccore/base/Ref.h:143
Arccore::MessagePassing::eReduceType
eReduceType
Types des réductions supportées.
Definition
MessagePassingGlobal.h:89
arcane
core
IParallelDispatch.h
Généré le Lundi 10 Février 2025 02:47:08 pour Arcane par
1.9.8