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

Public Member Functions

 HybridMachineShMemWinBaseInternal (Int32 my_rank_mpi, Int32 my_rank_local_proc, Int32 nb_rank_local_proc, ConstArrayView< Int32 > ranks, Int32 sizeof_type, Ref< Mpi::MpiMultiMachineShMemWinBaseInternal > mpi_windows, IThreadBarrier *barrier)
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_my_rank_local_proc = 0
Int32 m_nb_rank_local_proc = 0
Int32 m_my_rank_mpi = 0
ConstArrayView< Int32m_machine_ranks
Int32 m_sizeof_type = 0
Ref< Mpi::MpiMultiMachineShMemWinBaseInternalm_mpi_windows
IThreadBarrierm_thread_barrier = nullptr

Detailed Description

Definition at line 39 of file HybridMachineShMemWinBaseInternal.h.

Constructor & Destructor Documentation

◆ HybridMachineShMemWinBaseInternal()

Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::HybridMachineShMemWinBaseInternal ( Int32 my_rank_mpi,
Int32 my_rank_local_proc,
Int32 nb_rank_local_proc,
ConstArrayView< Int32 > ranks,
Int32 sizeof_type,
Ref< Mpi::MpiMultiMachineShMemWinBaseInternal > mpi_windows,
IThreadBarrier * barrier )

Definition at line 34 of file HybridMachineShMemWinBaseInternal.cc.

Member Function Documentation

◆ add() [1/2]

void Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::add ( )
overridevirtual

◆ add() [2/2]

void Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::add ( Span< const std::byte > elem)
overridevirtual

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 122 of file HybridMachineShMemWinBaseInternal.cc.

◆ addToAnotherSegment() [1/2]

void Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::addToAnotherSegment ( )
overridevirtual

◆ addToAnotherSegment() [2/2]

void Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::addToAnotherSegment ( Int32 rank,
Span< const std::byte > elem )
overridevirtual

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 149 of file HybridMachineShMemWinBaseInternal.cc.

◆ barrier()

void Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::barrier ( ) const
overridevirtual

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

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 66 of file HybridMachineShMemWinBaseInternal.cc.

◆ machineRanks()

ConstArrayView< Int32 > Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::machineRanks ( ) const
overridevirtual

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 57 of file HybridMachineShMemWinBaseInternal.cc.

◆ reserve() [1/2]

void Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::reserve ( )
overridevirtual

◆ reserve() [2/2]

void Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::reserve ( Int64 new_capacity)
overridevirtual

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 182 of file HybridMachineShMemWinBaseInternal.cc.

◆ resize() [1/2]

void Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::resize ( )
overridevirtual

◆ resize() [2/2]

void Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::resize ( Int64 new_size)
overridevirtual

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 209 of file HybridMachineShMemWinBaseInternal.cc.

◆ segmentConstView() [1/2]

Span< const std::byte > Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::segmentConstView ( ) const
overridevirtual

Method to get a view of our segment.

Non-collective call.

Returns
A view.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 100 of file HybridMachineShMemWinBaseInternal.cc.

◆ segmentConstView() [2/2]

Span< const std::byte > Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::segmentConstView ( Int32 rank) const
overridevirtual

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 109 of file HybridMachineShMemWinBaseInternal.cc.

◆ segmentView() [1/2]

Span< std::byte > Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::segmentView ( )
overridevirtual

Method to get a view of our segment.

Non-collective call.

Returns
A view.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 78 of file HybridMachineShMemWinBaseInternal.cc.

◆ segmentView() [2/2]

Span< std::byte > Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::segmentView ( Int32 rank)
overridevirtual

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 87 of file HybridMachineShMemWinBaseInternal.cc.

◆ shrink()

void Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::shrink ( )
overridevirtual

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

Collective call.

Implements Arcane::MessagePassing::IMachineShMemWinBaseInternal.

Definition at line 236 of file HybridMachineShMemWinBaseInternal.cc.

◆ sizeofOneElem()

Int32 Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::sizeofOneElem ( ) const
overridevirtual

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 48 of file HybridMachineShMemWinBaseInternal.cc.

Member Data Documentation

◆ m_machine_ranks

ConstArrayView<Int32> Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::m_machine_ranks
private

Definition at line 80 of file HybridMachineShMemWinBaseInternal.h.

◆ m_mpi_windows

Ref<Mpi::MpiMultiMachineShMemWinBaseInternal> Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::m_mpi_windows
private

Definition at line 83 of file HybridMachineShMemWinBaseInternal.h.

◆ m_my_rank_local_proc

Int32 Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::m_my_rank_local_proc = 0
private

Definition at line 76 of file HybridMachineShMemWinBaseInternal.h.

◆ m_my_rank_mpi

Int32 Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::m_my_rank_mpi = 0
private

Definition at line 78 of file HybridMachineShMemWinBaseInternal.h.

◆ m_nb_rank_local_proc

Int32 Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::m_nb_rank_local_proc = 0
private

Definition at line 77 of file HybridMachineShMemWinBaseInternal.h.

◆ m_sizeof_type

Int32 Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::m_sizeof_type = 0
private

Definition at line 82 of file HybridMachineShMemWinBaseInternal.h.

◆ m_thread_barrier

IThreadBarrier* Arcane::MessagePassing::HybridMachineShMemWinBaseInternal::m_thread_barrier = nullptr
private

Definition at line 85 of file HybridMachineShMemWinBaseInternal.h.


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