15#include "arcane/core/MachineShMemWinBase.h"
17#include "arcane/utils/NumericTypes.h"
19#include "arcane/core/IParallelMng.h"
20#include "arcane/core/internal/IParallelMngInternal.h"
22#include "arccore/message_passing/internal/IMachineShMemWinBaseInternal.h"
35: m_pm_internal(pm->_internalApi())
36, m_node_window_base(m_pm_internal->createMachineShMemWinBase(nb_elem_segment * static_cast<
Int64>(sizeof_elem), sizeof_elem))
37, m_sizeof_elem(sizeof_elem)
46 return m_node_window_base->machineRanks();
55 m_node_window_base->barrier();
64 return m_node_window_base->segmentView();
73 return m_node_window_base->segmentView(rank);
82 return m_node_window_base->segmentConstView();
91 return m_node_window_base->segmentConstView(rank);
100 return m_node_window_base->add(elem);
109 return m_node_window_base->add();
118 m_node_window_base->addToAnotherSegment(rank, elem);
127 m_node_window_base->addToAnotherSegment();
136 m_node_window_base->reserve(new_nb_elem_segment_capacity *
static_cast<Int64>(m_sizeof_elem));
145 m_node_window_base->reserve();
154 m_node_window_base->resize(new_nb_elem_segment *
static_cast<Int64>(m_sizeof_elem));
163 m_node_window_base->resize();
172 m_node_window_base->shrink();
Constant view of an array of type T.
Interface of the parallelism manager for a subdomain.
void barrier() const
Method to wait until all processes/threads on the node call this method to continue execution.
MachineShMemWinBase(IParallelMng *pm, Int64 sizeof_segment, Int32 sizeof_elem)
Constructor.
Span< const std::byte > segmentConstView() const
Method to obtain a view of our segment.
void reserve()
Method to be called by the subdomain(s) that do not wish to reserve more memory for their segments.
void shrink()
Method to reduce the reserved memory space for the segments to the minimum necessary.
void add()
Method to be called by the subdomain(s) that do not wish to add elements to its segment.
void resize()
Method to be called by the subdomain(s) that do not wish to resize their segments.
ConstArrayView< Int32 > machineRanks() const
Method to obtain the ranks that possess a segment in the window.
void addToAnotherSegment()
Method to be called by the subdomain(s) that do not wish to add elements into the segment of another ...
Span< std::byte > segmentView()
Method to obtain a view of our segment.
View of an array of elements of type T.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
std::int32_t Int32
Signed integer type of 32 bits.