Arcane  v3.16.7.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
DynamicMachineMemoryWindowBase.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/* DynamicMachineMemoryWindowBase.h (C) 2000-2025 */
9/* */
10/* Classe permettant de créer des fenêtres mémoires pour un noeud de calcul. */
11/* Les segments de ces fenêtres ne sont pas contigües en mémoire et peuvent */
12/* être redimensionnées. */
13/*---------------------------------------------------------------------------*/
14
15#ifndef ARCANE_CORE_DYNAMICMACHINEMEMORYWINDOWBASE_H
16#define ARCANE_CORE_DYNAMICMACHINEMEMORYWINDOWBASE_H
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
22#include "arcane/utils/Ref.h"
23
24#include "arccore/base/Span.h"
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29namespace Arcane
30{
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
35class IParallelMng;
36class IParallelMngInternal;
38{
39 class IDynamicMachineMemoryWindowBaseInternal;
40}
41
42/*---------------------------------------------------------------------------*/
43/*---------------------------------------------------------------------------*/
44
45class ARCANE_CORE_EXPORT DynamicMachineMemoryWindowBase
46{
47
48 public:
49
50 DynamicMachineMemoryWindowBase(IParallelMng* pm, Int64 sizeof_segment, Int32 sizeof_elem);
51
52 public:
53
54 Span<std::byte> segmentView();
55 Span<std::byte> segmentView(Int32 rank);
56
57 Span<const std::byte> segmentConstView() const;
58 Span<const std::byte> segmentConstView(Int32 rank) const;
59
60 void add(Span<const std::byte> elem);
61 void add();
62
63 void addToAnotherSegment(Int32 rank, Span<const std::byte> elem);
64 void addToAnotherSegment();
65
66 ConstArrayView<Int32> machineRanks() const;
67
68 void barrier() const;
69
70 void reserve(Int64 new_nb_elem_segment_capacity);
71 void reserve();
72
73 void resize(Int64 new_nb_elem_segment);
74 void resize();
75
76 void shrink();
77
78 private:
79
80 IParallelMngInternal* m_pm_internal;
82 Int32 m_sizeof_elem;
83};
84
85/*---------------------------------------------------------------------------*/
86/*---------------------------------------------------------------------------*/
87
88} // End namespace Arcane
89
90/*---------------------------------------------------------------------------*/
91/*---------------------------------------------------------------------------*/
92
93#endif
Déclarations des types généraux de Arcane.
Vue constante d'un tableau de type T.
Interface du gestionnaire de parallélisme pour un sous-domaine.
Référence à une instance.
Vue d'un tableau d'éléments de type T.
Definition Span.h:513
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.