Arcane  v3.16.8.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
MpiMachineMemoryWindowBaseInternalCreator.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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/* MpiMachineMemoryWindowBaseInternalCreator.h (C) 2000-2025 */
9/* */
10/* Classe permettant de créer des objets de type */
11/* MpiMachineMemoryWindowBaseInternal. */
12/*---------------------------------------------------------------------------*/
13
14#ifndef ARCCORE_MESSAGEPASSINGMPI_INTERNAL_MPIMACHINEMEMORYWINDOWBASEINTERNALCREATOR_H
15#define ARCCORE_MESSAGEPASSINGMPI_INTERNAL_MPIMACHINEMEMORYWINDOWBASEINTERNALCREATOR_H
16
17/*---------------------------------------------------------------------------*/
18/*---------------------------------------------------------------------------*/
19
20#include "arccore/collections/Array.h"
21#include "arccore/message_passing/internal/IMachineMemoryWindowBaseInternal.h"
22
23#include "arccore/message_passing_mpi/MessagePassingMpiGlobal.h"
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28namespace Arcane::MessagePassing::Mpi
29{
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
40
41class ARCCORE_MESSAGEPASSINGMPI_EXPORT MpiMachineMemoryWindowBaseInternalCreator
42{
43 public:
44
45 explicit MpiMachineMemoryWindowBaseInternalCreator(const MPI_Comm& comm_machine, Int32 comm_machine_rank, Int32 comm_machine_size, const MPI_Comm& comm_world, Int32 comm_world_size);
46
47 ~MpiMachineMemoryWindowBaseInternalCreator() = default;
48
49 public:
50
51 MpiMachineMemoryWindowBaseInternal* createWindow(Int64 sizeof_segment, Int32 sizeof_type) const;
52 MpiDynamicMachineMemoryWindowBaseInternal* createDynamicWindow(Int64 sizeof_segment, Int32 sizeof_type) const;
53 MpiDynamicMultiMachineMemoryWindowBaseInternal* createDynamicMultiWindow(SmallSpan<Int64> sizeof_segments, Int32 nb_segments_per_proc, Int32 sizeof_type) const;
54
55 ConstArrayView<Int32> machineRanks() const;
56
57 private:
58
59 MPI_Comm m_comm_machine;
60 Int32 m_comm_machine_rank = 0;
61 Int32 m_comm_machine_size = 0;
62 UniqueArray<Int32> m_machine_ranks;
63};
64
65/*---------------------------------------------------------------------------*/
66/*---------------------------------------------------------------------------*/
67
68} // namespace Arcane::MessagePassing::Mpi
69
70/*---------------------------------------------------------------------------*/
71/*---------------------------------------------------------------------------*/
72
73#endif
Vue constante d'un tableau de type T.
Classe basée sur MpiDynamicMachineMemoryWindowBaseInternal mais pouvant gérer plusieurs segments par ...
Vue d'un tableau d'éléments de type T.
Definition Span.h:673
Vecteur 1D de données avec sémantique par valeur (style STL).
std::int64_t Int64
Type entier signé sur 64 bits.
std::int32_t Int32
Type entier signé sur 32 bits.