Class allowing the creation of memory windows for a computing node. More...
Public Member Functions | |
| virtual Int32 | sizeofOneElem () const =0 |
| Method to get the size of an element in the window. | |
| virtual ConstArrayView< Int32 > | machineRanks () const =0 |
| Method to get the ranks that possess a segment in the window. | |
| virtual void | barrier () const =0 |
| Method to wait until all processes/threads of the node call this method to continue execution. | |
| virtual Span< std::byte > | segmentView ()=0 |
| Method to get a view of our segment. | |
| virtual Span< std::byte > | segmentView (Int32 rank)=0 |
| Method to get a view of the segment of another subdomain of the node. | |
| virtual Span< const std::byte > | segmentConstView () const =0 |
| Method to get a view of our segment. | |
| virtual Span< const std::byte > | segmentConstView (Int32 rank) const =0 |
| Method to get a view of the segment of another subdomain of the node. | |
| virtual void | add (Span< const std::byte > elem)=0 |
| Method to add elements into our segment. | |
| virtual void | add ()=0 |
| virtual void | addToAnotherSegment (Int32 rank, Span< const std::byte > elem)=0 |
| Method to add elements into the segment of another subdomain. | |
| virtual void | addToAnotherSegment ()=0 |
| virtual void | reserve (Int64 new_capacity)=0 |
| Method to reserve memory space in our segment. | |
| virtual void | reserve ()=0 |
| virtual void | resize (Int64 new_size)=0 |
| Method to resize our segment. | |
| virtual void | resize ()=0 |
| virtual void | shrink ()=0 |
| Method to reduce the reserved memory space for the segments to the minimum necessary. | |
Class allowing the creation of memory windows for a computing node.
The segments of these windows will not be contiguous in memory and can be resized (one window per process and one segment per window).
Since the add() method may want to resize a segment, and this resizing is a collective operation, calling add() is therefore a collective operation
To have non-concurrent add() calls, this operation is only possible on our segment. To add elements to the segment of another subdomain, the addToAnotherSegment() methods are available.
All sizes used are in bytes. sizeof_type is used only by MPI (if used) and for verification purposes.
Definition at line 49 of file IMachineShMemWinBaseInternal.h.
|
pure virtual |
|
pure virtual |
Method to add elements into our segment.
Collective call.
If the segment is too small, it will be resized.
Subdomains that do not wish to add elements can call the add() method without parameters or this method with an empty view.
| elem | The elements to add. |
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
See addToAnotherSegment(Int32 rank, Span<const std::byte> elem).
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
Method to add elements into the segment of another subdomain.
Collective call.
Two subdomains must not add elements to the same subdomain segment.
If the targeted segment is too small, it will be resized.
Subdomains that do not wish to add elements can call the addToAnotherSegment() method without parameters.
| rank | The subdomain into which to add elements. |
| elem | The elements to add. |
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
Method to wait until all processes/threads of the node call this method to continue execution.
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
Method to get the ranks that possess a segment in the window.
Non-collective call.
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
|
pure virtual |
Method to reserve memory space in our segment.
Collective call.
This method does nothing if new_capacity is less than the memory space already allocated for the segment. For processes that do not wish to increase the available memory space for their segment, it is possible to set the new_capacity parameter to 0 or use the reserve() method (without arguments).
MPI will reserve a space with a size greater than or equal to new_capacity.
This method does not resize the segment; you must always use the add() method to add elements.
To resize the segment, the resize(Int64 new_size) method is available.
| new_capacity | The requested new capacity. |
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
|
pure virtual |
Method to resize our segment.
Collective call.
If the provided size is less than the current size of the segment, elements located after the provided size will be deleted.
For processes that do not wish to resize their segment, it is possible to set the new_size argument to -1 or call the resize() method (without arguments).
| new_size | The new size. |
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
Method to get a view of our segment.
Non-collective call.
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
Method to get a view of the segment of another subdomain of the node.
Non-collective call.
| rank | The rank of the subdomain. |
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
Method to get a view of our segment.
Non-collective call.
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
Method to get a view of the segment of another subdomain of the node.
Non-collective call.
| rank | The rank of the subdomain. |
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
Method to reduce the reserved memory space for the segments to the minimum necessary.
Collective call.
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.
|
pure virtual |
Method to get the size of an element in the window.
Non-collective call.
Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.