Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
MpiMachineShMemWinBaseInternalCreator.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/* MpiMachineShMemWinBaseInternalCreator.h (C) 2000-2026 */
9/* */
10/* Class allowing the creation of objects of type */
11/* MpiContigMachineShMemWinBaseInternal. */
12/*---------------------------------------------------------------------------*/
13#ifndef ARCCORE_MESSAGEPASSINGMPI_INTERNAL_MPIMACHINESHMEMWINBASEINTERNALCREATOR_H
14#define ARCCORE_MESSAGEPASSINGMPI_INTERNAL_MPIMACHINESHMEMWINBASEINTERNALCREATOR_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
18#include "arccore/collections/Array.h"
19#include "arccore/message_passing/internal/IContigMachineShMemWinBaseInternal.h"
20
21#include "arccore/message_passing_mpi/MessagePassingMpiGlobal.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26namespace Arcane::MessagePassing::Mpi
27{
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
38
39class ARCCORE_MESSAGEPASSINGMPI_EXPORT MpiMachineShMemWinBaseInternalCreator
40{
41 public:
42
43 explicit MpiMachineShMemWinBaseInternalCreator(const MPI_Comm& comm_machine, Int32 comm_machine_rank, Int32 comm_machine_size, const MPI_Comm& comm_world, Int32 comm_world_size);
44
45 ~MpiMachineShMemWinBaseInternalCreator() = default;
46
47 public:
48
49 MpiContigMachineShMemWinBaseInternal* createWindow(Int64 sizeof_segment, Int32 sizeof_type) const;
50 MpiMachineShMemWinBaseInternal* createDynamicWindow(Int64 sizeof_segment, Int32 sizeof_type) const;
51 MpiMultiMachineShMemWinBaseInternal* createDynamicMultiWindow(SmallSpan<Int64> sizeof_segments, Int32 nb_segments_per_proc, Int32 sizeof_type) const;
52
53 ConstArrayView<Int32> machineRanks() const;
54 void machineBarrier() const;
55
56 private:
57
58 MPI_Comm m_comm_machine;
59 Int32 m_comm_machine_rank = 0;
60 Int32 m_comm_machine_size = 0;
61 UniqueArray<Int32> m_machine_ranks;
62};
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
67} // namespace Arcane::MessagePassing::Mpi
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
71
72#endif
Constant view of an array of type T.
Class based on MpiMachineShMemWinBaseInternal but capable of managing multiple segments per process.
View of an array of elements of type T.
Definition Span.h:805
1D data vector with value semantics (STL style).
std::int64_t Int64
Signed integer type of 64 bits.
std::int32_t Int32
Signed integer type of 32 bits.