Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
MpiParallelNonBlockingCollectiveDispatch.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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/* MpiParallelNonBlockingCollectiveDispatch.h (C) 2000-2018 */
9/* */
10/* MPI implementation of non-blocking collectives for a given type. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_PARALLEL_MPI_MPIPARALLELNONBLOCKINGCOLLECTIVEDISPATCH_H
13#define ARCANE_PARALLEL_MPI_MPIPARALLELNONBLOCKINGCOLLECTIVEDISPATCH_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18
19#include "arcane/core/IParallelNonBlockingCollectiveDispatch.h"
20
21#include "arcane/parallel/mpi/ArcaneMpi.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26namespace Arcane
27{
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
32class MpiParallelMng;
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
41template <class Type>
42class MpiParallelNonBlockingCollectiveDispatchT
43: public TraceAccessor
45{
46 public:
47
48 typedef Parallel::Request Request;
49 typedef Parallel::eReduceType eReduceType;
50
51 public:
52
53 ARCANE_MPI_EXPORT MpiParallelNonBlockingCollectiveDispatchT(ITraceMng* tm, IParallelNonBlockingCollective* parallel_mng, MpiAdapter* adapter);
54 virtual ARCANE_MPI_EXPORT ~MpiParallelNonBlockingCollectiveDispatchT();
55 virtual ARCANE_MPI_EXPORT void finalize();
56
57 public:
58
59 virtual ARCANE_MPI_EXPORT Request broadcast(ArrayView<Type> send_buf, Integer sub_domain);
60 virtual ARCANE_MPI_EXPORT Request allGather(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf);
61 virtual ARCANE_MPI_EXPORT Request allGatherVariable(ConstArrayView<Type> send_buf, Array<Type>& recv_buf);
62 virtual ARCANE_MPI_EXPORT Request gather(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf, Integer rank);
63 virtual ARCANE_MPI_EXPORT Request gatherVariable(ConstArrayView<Type> send_buf, Array<Type>& recv_buf, Integer rank);
64 virtual ARCANE_MPI_EXPORT Request scatterVariable(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf, Integer root);
65 virtual ARCANE_MPI_EXPORT Request allToAll(ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf, Integer count);
66 virtual ARCANE_MPI_EXPORT Request allToAllVariable(ConstArrayView<Type> send_buf, Int32ConstArrayView send_count,
67 Int32ConstArrayView send_index, ArrayView<Type> recv_buf,
68 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index);
69 virtual ARCANE_MPI_EXPORT Request allReduce(eReduceType op, ConstArrayView<Type> send_buf, ArrayView<Type> recv_buf);
70
71 private:
72
73 IParallelMng* m_parallel_mng;
74 MpiAdapter* m_adapter;
75 MpiDatatype* m_datatype;
76
77 private:
78};
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
82
83} // namespace Arcane
84
85/*---------------------------------------------------------------------------*/
86/*---------------------------------------------------------------------------*/
87
88#endif
Modifiable view of an array of type T.
Base class for 1D data vectors.
Constant view of an array of type T.
Interface of the parallelism manager for a subdomain.
Interface for non-blocking collectives for the type Type.
Interface for non-blocking collective parallel operations.
Parallelism manager using MPI.
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
eReduceType
Supported reduction types.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482