Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ParallelSuperMngDispatcher.cc
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/* ParallelSuperMngDispatcher.cc (C) 2000-2005 */
9/* */
10/* Redirection de la gestion des messages suivant le type des arguments. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14
15#include "arcane/utils/ArcanePrecomp.h"
16
17#include "arcane/utils/ArrayView.h"
18#include "arcane/utils/Iostream.h"
19
20#include "arcane/ParallelSuperMngDispatcher.h"
21#include "arcane/IParallelDispatch.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26ARCANE_BEGIN_NAMESPACE
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31ParallelSuperMngDispatcher::
32ParallelSuperMngDispatcher()
33: m_byte(0)
34, m_int32(0)
35, m_int64(0)
36, m_real(0)
37{
38}
39
40/*---------------------------------------------------------------------------*/
41/*---------------------------------------------------------------------------*/
42
43ParallelSuperMngDispatcher::
44~ParallelSuperMngDispatcher()
45{
46 delete m_byte;
47 delete m_int32;
48 delete m_int64;
49 delete m_real;
50}
51
52/*---------------------------------------------------------------------------*/
53/*---------------------------------------------------------------------------*/
54
55void ParallelSuperMngDispatcher::
56_setDispatchers(IParallelDispatchT<Byte>* c,IParallelDispatchT<Int32>* i32,
57 IParallelDispatchT<Int64>* i64,IParallelDispatchT<Real>* r)
58{
59 m_byte = c;
60 m_int32 = i32;
61 m_int64 = i64;
62 m_real = r;
63}
64
65/*---------------------------------------------------------------------------*/
66/*---------------------------------------------------------------------------*/
67
68void ParallelSuperMngDispatcher::
69_finalize()
70{
71 if (m_byte)
72 m_byte->finalize();
73 if (m_int32)
74 m_int32->finalize();
75 if (m_int64)
76 m_int64->finalize();
77 if (m_real)
78 m_real->finalize();
79}
80
81/*---------------------------------------------------------------------------*/
82/*---------------------------------------------------------------------------*/
83
84void ParallelSuperMngDispatcher::
85allGather(ByteConstArrayView send_buf,ByteArrayView recv_buf)
86{ m_byte->allGather(send_buf,recv_buf); }
87void ParallelSuperMngDispatcher::
88allGather(Int32ConstArrayView send_buf,Int32ArrayView recv_buf)
89{ m_int32->allGather(send_buf,recv_buf); }
90void ParallelSuperMngDispatcher::
91allGather(Int64ConstArrayView send_buf,Int64ArrayView recv_buf)
92{ m_int64->allGather(send_buf,recv_buf); }
93void ParallelSuperMngDispatcher::
94allGather(RealConstArrayView send_buf,RealArrayView recv_buf)
95{ m_real->allGather(send_buf,recv_buf); }
96
97Int32 ParallelSuperMngDispatcher::
98reduce(eReduceType rt,Int32 v)
99{ return m_int32->allReduce(rt,v); }
100Int64 ParallelSuperMngDispatcher::
101reduce(eReduceType rt,Int64 v)
102{ return m_int64->allReduce(rt,v); }
103Real ParallelSuperMngDispatcher::
104reduce(eReduceType rt,Real v)
105{ return m_real->allReduce(rt,v); }
106
107void ParallelSuperMngDispatcher::
108reduce(eReduceType rt,Int32ArrayView v)
109{ m_int32->allReduce(rt,v); }
110void ParallelSuperMngDispatcher::
111reduce(eReduceType rt,Int64ArrayView v)
112{ m_int64->allReduce(rt,v); }
113void ParallelSuperMngDispatcher::
114reduce(eReduceType rt,RealArrayView v)
115{ m_real->allReduce(rt,v); }
116
117void ParallelSuperMngDispatcher::
118broadcast(ByteArrayView send_buf,Integer id)
119{ m_byte->broadcast(send_buf,id); }
120void ParallelSuperMngDispatcher::
121broadcast(Int32ArrayView send_buf,Integer id)
122{ m_int32->broadcast(send_buf,id); }
123void ParallelSuperMngDispatcher::
124broadcast(Int64ArrayView send_buf,Integer id)
125{ m_int64->broadcast(send_buf,id); }
126void ParallelSuperMngDispatcher::
127broadcast(RealArrayView send_buf,Integer id)
128{ m_real->broadcast(send_buf,id); }
129
130void ParallelSuperMngDispatcher::
131send(ByteConstArrayView values,Integer id)
132{ m_byte->send(values,id); }
133void ParallelSuperMngDispatcher::
134send(Int32ConstArrayView values,Integer id)
135{ m_int32->send(values,id); }
136void ParallelSuperMngDispatcher::
137send(Int64ConstArrayView values,Integer id)
138{ m_int64->send(values,id); }
139void ParallelSuperMngDispatcher::
140send(RealConstArrayView values,Integer id)
141{ m_real->send(values,id); }
142
143void ParallelSuperMngDispatcher::
144recv(ByteArrayView values,Integer id)
145{ m_byte->recv(values,id); }
146void ParallelSuperMngDispatcher::
147recv(Int32ArrayView values,Integer id)
148{ m_int32->recv(values,id); }
149void ParallelSuperMngDispatcher::
150recv(Int64ArrayView values,Integer id)
151{ m_int64->recv(values,id); }
152void ParallelSuperMngDispatcher::
153recv(RealArrayView values,Integer id)
154{ m_real->recv(values,id); }
155
156Parallel::Request ParallelSuperMngDispatcher::
157send(ByteConstArrayView values,Integer id,bool is_blocked)
158{ return m_byte->send(values,id,is_blocked); }
159Parallel::Request ParallelSuperMngDispatcher::
160send(Int32ConstArrayView values,Integer id,bool is_blocked)
161{ return m_int32->send(values,id,is_blocked); }
162Parallel::Request ParallelSuperMngDispatcher::
163send(Int64ConstArrayView values,Integer id,bool is_blocked)
164{ return m_int64->send(values,id,is_blocked); }
165Parallel::Request ParallelSuperMngDispatcher::
166send(RealConstArrayView values,Integer id,bool is_blocked)
167{ return m_real->send(values,id,is_blocked); }
168
169Parallel::Request ParallelSuperMngDispatcher::
170recv(ByteArrayView values,Integer id,bool is_blocked)
171{ return m_byte->recv(values,id,is_blocked); }
172Parallel::Request ParallelSuperMngDispatcher::
173recv(Int32ArrayView values,Integer id,bool is_blocked)
174{ return m_int32->recv(values,id,is_blocked); }
175Parallel::Request ParallelSuperMngDispatcher::
176recv(Int64ArrayView values,Integer id,bool is_blocked)
177{ return m_int64->recv(values,id,is_blocked); }
178Parallel::Request ParallelSuperMngDispatcher::
179recv(RealArrayView values,Integer id,bool is_blocked)
180{ return m_real->recv(values,id,is_blocked); }
181
182void ParallelSuperMngDispatcher::
183sendRecv(ByteConstArrayView send_buf,ByteArrayView recv_buf,Integer id)
184{ m_byte->sendRecv(send_buf,recv_buf,id); }
185void ParallelSuperMngDispatcher::
186sendRecv(Int32ConstArrayView send_buf,Int32ArrayView recv_buf,Integer id)
187{ m_int32->sendRecv(send_buf,recv_buf,id); }
188void ParallelSuperMngDispatcher::
189sendRecv(Int64ConstArrayView send_buf,Int64ArrayView recv_buf,Integer id)
190{ m_int64->sendRecv(send_buf,recv_buf,id); }
191void ParallelSuperMngDispatcher::
192sendRecv(RealConstArrayView send_buf,RealArrayView recv_buf,Integer id)
193{ m_real->sendRecv(send_buf,recv_buf,id); }
194
195void ParallelSuperMngDispatcher::
196allToAll(ByteConstArrayView send_buf,ByteArrayView recv_buf,Integer count)
197{ m_byte->allToAll(send_buf,recv_buf,count); }
198void ParallelSuperMngDispatcher::
199allToAll(Int32ConstArrayView send_buf,Int32ArrayView recv_buf,Integer count)
200{ m_int32->allToAll(send_buf,recv_buf,count); }
201void ParallelSuperMngDispatcher::
202allToAll(Int64ConstArrayView send_buf,Int64ArrayView recv_buf,Integer count)
203{ m_int64->allToAll(send_buf,recv_buf,count); }
204void ParallelSuperMngDispatcher::
205allToAll(RealConstArrayView send_buf,RealArrayView recv_buf,Integer count)
206{ m_real->allToAll(send_buf,recv_buf,count); }
207
208Int32 ParallelSuperMngDispatcher::
209scan(eReduceType rt,Int32 v)
210{ return m_int32->scan(rt,v); }
211Int64 ParallelSuperMngDispatcher::
212scan(eReduceType rt,Int64 v)
213{ return m_int64->scan(rt,v); }
214Real ParallelSuperMngDispatcher::
215scan(eReduceType rt,Real v)
216{ return m_real->scan(rt,v); }
217
218void ParallelSuperMngDispatcher::
219scan(eReduceType rt,Int32ArrayView v)
220{ m_int32->scan(rt,v); }
221void ParallelSuperMngDispatcher::
222scan(eReduceType rt,Int64ArrayView v)
223{ m_int64->scan(rt,v); }
224void ParallelSuperMngDispatcher::
225scan(eReduceType rt,RealArrayView v)
226{ m_real->scan(rt,v); }
227
228/*---------------------------------------------------------------------------*/
229/*---------------------------------------------------------------------------*/
230
231ARCANE_END_NAMESPACE
232
233/*---------------------------------------------------------------------------*/
234/*---------------------------------------------------------------------------*/
235
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Vue modifiable d'un tableau d'un type T.