Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::SequentialMachineShMemWinBaseInternal Class Reference
Inheritance diagram for Arcane::SequentialMachineShMemWinBaseInternal:
Collaboration diagram for Arcane::SequentialMachineShMemWinBaseInternal:

Public Member Functions

 SequentialMachineShMemWinBaseInternal (Int64 sizeof_segment, Int32 sizeof_type)
Int32 sizeofOneElem () const override
 Method to get the size of an element in the window.
ConstArrayView< Int32machineRanks () const override
 Method to get the ranks that possess a segment in the window.
void barrier () const override
 Method to wait until all processes/threads of the node call this method to continue execution.
Span< std::byte > segmentView () override
 Method to get a view of our segment.
Span< std::byte > segmentView (Int32 rank) override
 Method to get a view of the segment of another subdomain of the node.
Span< const std::byte > segmentConstView () const override
 Method to get a view of our segment.
Span< const std::byte > segmentConstView (Int32 rank) const override
 Method to get a view of the segment of another subdomain of the node.
void add (Span< const std::byte > elem) override
 Method to add elements into our segment.
void add () override
void addToAnotherSegment (Int32 rank, Span< const std::byte > elem) override
 Method to add elements into the segment of another subdomain.
void addToAnotherSegment () override
void reserve (Int64 new_capacity) override
 Method to reserve memory space in our segment.
void reserve () override
void resize (Int64 new_size) override
 Method to resize our segment.
void resize () override
void shrink () override
 Method to reduce the reserved memory space for the segments to the minimum necessary.

Private Attributes

Int32 m_sizeof_type
UniqueArray< std::byte > m_segment
Int32 m_my_rank = 0

Detailed Description

Definition at line 442 of file SequentialParallelMng.cc.

Constructor & Destructor Documentation

◆ SequentialMachineShMemWinBaseInternal()

Arcane::SequentialMachineShMemWinBaseInternal::SequentialMachineShMemWinBaseInternal ( Int64 sizeof_segment,
Int32 sizeof_type )
inline

Definition at line 447 of file SequentialParallelMng.cc.

Member Function Documentation

◆ add() [1/2]

void Arcane::SequentialMachineShMemWinBaseInternal::add ( )
inlineoverridevirtual

◆ add() [2/2]

void Arcane::SequentialMachineShMemWinBaseInternal::add ( Span< const std::byte > elem)
inlineoverridevirtual

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.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 487 of file SequentialParallelMng.cc.

References ARCCORE_FATAL, and Arcane::SpanImpl< T, SizeType, Extent >::size().

Here is the call graph for this function:

◆ addToAnotherSegment() [1/2]

void Arcane::SequentialMachineShMemWinBaseInternal::addToAnotherSegment ( )
inlineoverridevirtual

◆ addToAnotherSegment() [2/2]

void Arcane::SequentialMachineShMemWinBaseInternal::addToAnotherSegment ( Int32 rank,
Span< const std::byte > elem )
inlineoverridevirtual

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.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 495 of file SequentialParallelMng.cc.

References ARCANE_FATAL, ARCCORE_FATAL, and Arcane::SpanImpl< T, SizeType, Extent >::size().

Here is the call graph for this function:

◆ barrier()

void Arcane::SequentialMachineShMemWinBaseInternal::barrier ( ) const
inlineoverridevirtual

Method to wait until all processes/threads of the node call this method to continue execution.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 463 of file SequentialParallelMng.cc.

◆ machineRanks()

ConstArrayView< Int32 > Arcane::SequentialMachineShMemWinBaseInternal::machineRanks ( ) const
inlineoverridevirtual

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

Non-collective call.

Returns
A view containing the rank IDs.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 459 of file SequentialParallelMng.cc.

◆ reserve() [1/2]

void Arcane::SequentialMachineShMemWinBaseInternal::reserve ( )
inlineoverridevirtual

◆ reserve() [2/2]

void Arcane::SequentialMachineShMemWinBaseInternal::reserve ( Int64 new_capacity)
inlineoverridevirtual

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.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 507 of file SequentialParallelMng.cc.

◆ resize() [1/2]

void Arcane::SequentialMachineShMemWinBaseInternal::resize ( )
inlineoverridevirtual

◆ resize() [2/2]

void Arcane::SequentialMachineShMemWinBaseInternal::resize ( Int64 new_size)
inlineoverridevirtual

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.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 512 of file SequentialParallelMng.cc.

◆ segmentConstView() [1/2]

Span< const std::byte > Arcane::SequentialMachineShMemWinBaseInternal::segmentConstView ( ) const
inlineoverridevirtual

Method to get a view of our segment.

Non-collective call.

Returns
A view.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 476 of file SequentialParallelMng.cc.

◆ segmentConstView() [2/2]

Span< const std::byte > Arcane::SequentialMachineShMemWinBaseInternal::segmentConstView ( Int32 rank) const
inlineoverridevirtual

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.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 480 of file SequentialParallelMng.cc.

References ARCANE_FATAL.

◆ segmentView() [1/2]

Span< std::byte > Arcane::SequentialMachineShMemWinBaseInternal::segmentView ( )
inlineoverridevirtual

Method to get a view of our segment.

Non-collective call.

Returns
A view.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 465 of file SequentialParallelMng.cc.

◆ segmentView() [2/2]

Span< std::byte > Arcane::SequentialMachineShMemWinBaseInternal::segmentView ( Int32 rank)
inlineoverridevirtual

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.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 469 of file SequentialParallelMng.cc.

References ARCANE_FATAL.

◆ shrink()

void Arcane::SequentialMachineShMemWinBaseInternal::shrink ( )
inlineoverridevirtual

Method to reduce the reserved memory space for the segments to the minimum necessary.

Collective call.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 517 of file SequentialParallelMng.cc.

◆ sizeofOneElem()

Int32 Arcane::SequentialMachineShMemWinBaseInternal::sizeofOneElem ( ) const
inlineoverridevirtual

Method to get the size of an element in the window.

Non-collective call.

Returns
The size of an element.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 455 of file SequentialParallelMng.cc.

Member Data Documentation

◆ m_my_rank

Int32 Arcane::SequentialMachineShMemWinBaseInternal::m_my_rank = 0
private

Definition at line 526 of file SequentialParallelMng.cc.

◆ m_segment

UniqueArray<std::byte> Arcane::SequentialMachineShMemWinBaseInternal::m_segment
private

Definition at line 525 of file SequentialParallelMng.cc.

◆ m_sizeof_type

Int32 Arcane::SequentialMachineShMemWinBaseInternal::m_sizeof_type
private

Definition at line 524 of file SequentialParallelMng.cc.


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