Arcane  v3.16.8.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
HybridMachineMemoryWindowBaseInternalCreator.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/* HybridMachineMemoryWindowBaseInternalCreator.h (C) 2000-2025 */
9/* */
10/* Classe permettant de créer des objets de type */
11/* HybridMachineMemoryWindowBaseInternal. Une instance de cet objet doit */
12/* être partagée par tous les threads d'un processus. */
13/*---------------------------------------------------------------------------*/
14
15#ifndef ARCANE_PARALLEL_MPITHREAD_INTERNAL_HYBRIDMACHINEMEMORYWINDOWBASEINTERNALCREATOR_H
16#define ARCANE_PARALLEL_MPITHREAD_INTERNAL_HYBRIDMACHINEMEMORYWINDOWBASEINTERNALCREATOR_H
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21#include "arcane/utils/Ref.h"
22#include "arcane/utils/UniqueArray.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
29class MpiParallelMng;
30
31namespace MessagePassing
32{
36
37 namespace Mpi
38 {
41 } // namespace Mpi
42} // namespace MessagePassing
43} // namespace Arcane
44
45/*---------------------------------------------------------------------------*/
46/*---------------------------------------------------------------------------*/
47
49{
50
51/*---------------------------------------------------------------------------*/
52/*---------------------------------------------------------------------------*/
53
54class HybridMachineMemoryWindowBaseInternalCreator
55{
56 public:
57
58 HybridMachineMemoryWindowBaseInternalCreator(Int32 nb_rank_local_proc, IThreadBarrier* barrier);
59 ~HybridMachineMemoryWindowBaseInternalCreator() = default;
60
61 public:
62
63 HybridMachineMemoryWindowBaseInternal* createWindow(Int32 my_rank_global, Int64 sizeof_segment, Int32 sizeof_type, MpiParallelMng* mpi_parallel_mng);
64 HybridDynamicMachineMemoryWindowBaseInternal* createDynamicWindow(Int32 my_rank_global, Int64 sizeof_segment, Int32 sizeof_type, MpiParallelMng* mpi_parallel_mng);
65
66 private:
67
68 void _buildMachineRanksArray(const Mpi::MpiMachineMemoryWindowBaseInternalCreator* mpi_window_creator);
69
70 private:
71
72 Int32 m_nb_rank_local_proc = 0;
73 Int64 m_sizeof_segment_local_proc = 0;
74 IThreadBarrier* m_barrier = nullptr;
75 UniqueArray<Int32> m_machine_ranks;
76
78 Ref<IMachineMemoryWindowBaseInternal> m_sizeof_sub_segments;
79 Ref<IMachineMemoryWindowBaseInternal> m_sum_sizeof_sub_segments;
80 //-----------
82 UniqueArray<Int64> m_sizeof_resize_segments;
83};
84/*---------------------------------------------------------------------------*/
85/*---------------------------------------------------------------------------*/
86
87} // namespace Arcane::MessagePassing
88
89/*---------------------------------------------------------------------------*/
90/*---------------------------------------------------------------------------*/
91
92#endif
Classe permettant de créer une fenêtre mémoire pour un noeud de calcul.
Classe basée sur MpiDynamicMachineMemoryWindowBaseInternal mais pouvant gérer plusieurs segments par ...
Gestionnaire du parallélisme utilisant MPI.
Référence à une instance.
Vecteur 1D de données avec sémantique par valeur (style STL).
Déclarations des types et méthodes utilisés par les mécanismes d'échange de messages.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int64_t Int64
Type entier signé sur 64 bits.
std::int32_t Int32
Type entier signé sur 32 bits.