14#ifndef ARCANE_CORE_MACHINESHMEMWIN_H
15#define ARCANE_CORE_MACHINESHMEMWIN_H
19#include "arcane/core/MachineShMemWinBase.h"
21#include "arcane/utils/Ref.h"
57 : m_impl(pm, nb_elem_segment, static_cast<
Int32>(sizeof(Type)))
65 : m_impl(pm, 0, static_cast<
Int32>(sizeof(Type)))
80 return m_impl.machineRanks();
160 m_impl.add(span_bytes);
200 m_impl.addToAnotherSegment(rank, span_bytes);
215 m_impl.addToAnotherSegment();
243 m_impl.reserve(new_capacity);
275 m_impl.resize(new_nb_elem);
Declarations of Arcane's general types.
Types and functions associated with the classes SpanImpl, SmallSpan and Span.
Constant view of an array of type T.
Interface of the parallelism manager for a subdomain.
Class allowing the creation of a shared memory window between the subdomains of the same node.
void resize(Int64 new_nb_elem)
Method to resize our segment.
void shrink()
Method to reduce the reserved memory space for the segments to the minimum necessary.
Span< const Type > segmentConstView(Int32 rank) const
Method to obtain a view of the segment of another sub-domain on the node.
void resize()
Method to be called by the sub-domain(s) that do not wish to resize their segments.
void add()
Method to be called by the sub-domain(s) that do not wish to add elements to their segment.
ConstArrayView< Int32 > machineRanks() const
Method to obtain the ranks that possess a segment in the window.
Span< const Type > segmentConstView() const
Method to obtain a view of our segment.
Span< Type > segmentView(Int32 rank)
Method to obtain a view of the segment of another sub-domain on the node.
Span< Type > segmentView()
Method to obtain a view of our segment.
void addToAnotherSegment(Int32 rank, Span< const Type > elem)
Method to add elements to the segment of another sub-domain.
void add(Span< const Type > elem)
Method to add elements to our segment.
void addToAnotherSegment()
Method to be called by the sub-domain(s) that do not wish to add elements to the segment of another s...
MachineShMemWin(IParallelMng *pm, Int64 nb_elem_segment)
Constructor.
void barrier() const
Method to wait until all processes/threads on the node call this method to continue execution.
void reserve(Int64 new_capacity)
Method to reserve memory space in our segment.
MachineShMemWin(IParallelMng *pm)
Constructor.
void reserve()
Method to be called by the sub-domain(s) that do not wish to reserve more memory for their segments.
constexpr __host__ __device__ pointer data() const noexcept
Pointer to the start of the view.
constexpr __host__ __device__ SizeType sizeBytes() const noexcept
Returns the size of the array in bytes.
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.
Span< DataType > asSpan(Span< std::byte, Extent > bytes)
Converts a Span<std::byte> into a Span<DataType>.
std::int32_t Int32
Signed integer type of 32 bits.