Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::MessagePassing::IMachineShMemWinBaseInternal Class Referenceabstract

Class allowing the creation of memory windows for a computing node. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/message_passing/arccore/message_passing/internal/IMachineShMemWinBaseInternal.h>

Inheritance diagram for Arcane::MessagePassing::IMachineShMemWinBaseInternal:
Collaboration diagram for Arcane::MessagePassing::IMachineShMemWinBaseInternal:

Public Member Functions

virtual Int32 sizeofOneElem () const =0
 Method to get the size of an element in the window.
virtual ConstArrayView< Int32machineRanks () 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.

Detailed Description

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.

Member Function Documentation

◆ add() [1/2]

◆ add() [2/2]

virtual void Arcane::MessagePassing::IMachineShMemWinBaseInternal::add ( Span< const std::byte > elem)
pure virtual

Method to add elements into our segment.

Collective call.

Note
Do not mix calls to this method with calls to addToAnotherSegment().

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.

Parameters
elemThe elements to add.

Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.

◆ addToAnotherSegment() [1/2]

◆ addToAnotherSegment() [2/2]

virtual void Arcane::MessagePassing::IMachineShMemWinBaseInternal::addToAnotherSegment ( Int32 rank,
Span< const std::byte > elem )
pure virtual

Method to add elements into the segment of another subdomain.

Collective call.

Note
Do not mix calls to this method with calls to add().

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.

Parameters
rankThe subdomain into which to add elements.
elemThe elements to add.

Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.

◆ barrier()

virtual void Arcane::MessagePassing::IMachineShMemWinBaseInternal::barrier ( ) const
pure virtual

◆ machineRanks()

virtual ConstArrayView< Int32 > Arcane::MessagePassing::IMachineShMemWinBaseInternal::machineRanks ( ) const
pure virtual

Method to get the ranks that possess a segment in the window.

Non-collective call.

Returns
A view containing the rank IDs.

Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.

◆ reserve() [1/2]

◆ reserve() [2/2]

virtual void Arcane::MessagePassing::IMachineShMemWinBaseInternal::reserve ( Int64 new_capacity)
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.

Parameters
new_capacityThe requested new capacity.

Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.

◆ resize() [1/2]

◆ resize() [2/2]

virtual void Arcane::MessagePassing::IMachineShMemWinBaseInternal::resize ( Int64 new_size)
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).

Parameters
new_sizeThe new size.

Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.

◆ segmentConstView() [1/2]

virtual Span< const std::byte > Arcane::MessagePassing::IMachineShMemWinBaseInternal::segmentConstView ( ) const
pure virtual

◆ segmentConstView() [2/2]

virtual Span< const std::byte > Arcane::MessagePassing::IMachineShMemWinBaseInternal::segmentConstView ( Int32 rank) const
pure virtual

Method to get a view of the segment of another subdomain of the node.

Non-collective call.

Parameters
rankThe rank of the subdomain.
Returns
A view.

Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.

◆ segmentView() [1/2]

virtual Span< std::byte > Arcane::MessagePassing::IMachineShMemWinBaseInternal::segmentView ( )
pure virtual

◆ segmentView() [2/2]

virtual Span< std::byte > Arcane::MessagePassing::IMachineShMemWinBaseInternal::segmentView ( Int32 rank)
pure virtual

Method to get a view of the segment of another subdomain of the node.

Non-collective call.

Parameters
rankThe rank of the subdomain.
Returns
A view.

Implemented in Arcane::MessagePassing::HybridMachineShMemWinBaseInternal, Arcane::MessagePassing::Mpi::MpiMachineShMemWinBaseInternal, Arcane::MessagePassing::SharedMemoryMachineShMemWinBaseInternal, and Arcane::SequentialMachineShMemWinBaseInternal.

◆ shrink()

virtual void Arcane::MessagePassing::IMachineShMemWinBaseInternal::shrink ( )
pure virtual

◆ sizeofOneElem()

virtual Int32 Arcane::MessagePassing::IMachineShMemWinBaseInternal::sizeofOneElem ( ) const
pure virtual

The documentation for this class was generated from the following file: