14#ifndef ARCCORE_MESSAGEPASSINGMPI_INTERNAL_MPIMULTIMACHINESHMEMWINBASEINTERNAL_H
15#define ARCCORE_MESSAGEPASSINGMPI_INTERNAL_MPIMULTIMACHINESHMEMWINBASEINTERNAL_H
19#include "arccore/collections/Array.h"
21#include "arccore/message_passing_mpi/MessagePassingMpiGlobal.h"
26namespace Arcane::MessagePassing::Mpi
299 void _executeRealloc();
352 MPI_Comm m_comm_machine;
353 Int32 m_comm_machine_size = 0;
354 Int32 m_comm_machine_rank = 0;
356 Int32 m_sizeof_type = 0;
357 Int32 m_nb_segments_per_proc = 0;
365 bool m_add_requested =
false;
371 bool m_resize_requested =
false;
Constant view of an array of type T.
void requestAdd(Int32 num_seg, Span< const std::byte > elem)
Method to request the addition of elements into one of our segments.
Span< const std::byte > segmentConstView(Int32 num_seg) const
Method to get a constant view of one of our segments.
void executeResize()
Method to execute the resizing requests.
void executeShrink()
Method to reduce the reserved memory space for the segments to the minimum necessary.
void requestReserve(Int32 num_seg, Int64 new_capacity)
Method to request the reservation of memory space for one of our segments.
void requestAddToAnotherSegment(Int32 thread, Int32 rank, Int32 num_seg, Span< const std::byte > elem)
Method to request the addition of elements into one of the segments of the window.
void executeReserve()
Method to execute the reservation requests.
void _requestRealloc(Int32 owner_pos_segment, Int64 new_capacity) const
Method to request a reallocation.
MpiMultiMachineShMemWinBaseInternal(SmallSpan< Int64 > sizeof_segments, Int32 nb_segments_per_proc, Int32 sizeof_type, const MPI_Comm &comm_machine, Int32 comm_machine_rank, Int32 comm_machine_size, ConstArrayView< Int32 > machine_ranks)
sizeof_segments should not be preserved!
void executeAdd()
Method to execute the addition requests.
void requestResize(Int32 num_seg, Int64 new_size)
Method to request the resizing of one of our segments.
Span< Int32 > m_target_segments
void barrier() const
Method to wait until all processes on the node call this method to continue execution.
void executeAddToAnotherSegment()
Method to execute the addition requests in the segments of other processes.
MPI_Win m_win_actual_sizeof
Contiguous window with main window sizes.
UniqueArray< MPI_Win > m_all_mpi_win
Span< Int64 > m_need_resize
UniqueArray< Span< std::byte > > m_reserved_part_span
UniqueArray< Span< const std::byte > > m_add_requests
Int32 sizeofOneElem() const
Method to get the size of an element in the window.
UniqueArray< Int64 > m_resize_requests
Span< Int64 > m_sizeof_used_part
MPI_Win m_win_need_resize
Span< std::byte > segmentView(Int32 num_seg)
Method to get a view of one of our segments.
MPI_Win m_win_target_segments
ConstArrayView< Int32 > machineRanks() const
Method to get the ranks that own a segment in the window.
View of an array of elements of type T.
View of an array of elements of type T.
1D data vector with value semantics (STL style).
std::int64_t Int64
Signed integer type of 64 bits.
std::int32_t Int32
Signed integer type of 32 bits.