Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::MachineShMemWinVariableArray2T< DataType > Class Template Reference

Class allowing access to the shared elements of the variable in shared memory. More...

#include <arcane/core/MachineShMemWinVariable.h>

Public Member Functions

 MachineShMemWinVariableArray2T (VariableRefArray2T< DataType > var)
 Constructor.
ConstArrayView< Int32machineRanks () const
 Method allowing retrieval of ranks that possess a segment in the window.
void barrier () const
 Method allowing waiting until all processes/threads on the node call this method to continue execution.
Span2< DataType > view (Int32 rank) const
 Method allowing retrieval of a view on the array of another subdomain on the node.
void updateVariable ()
 Method allowing updating this object after a resizing of the variable.

Detailed Description

template<class DataType>
class Arcane::MachineShMemWinVariableArray2T< DataType >

Class allowing access to the shared elements of the variable in shared memory.

It is necessary that this variable be allocated in shared memory with the property "IVariable::PInShMem".

This class works for 2D array variables without support.

If the size of the variable changes while an object of this type is used, it is necessary to call the updateVariable() method.

Definition at line 255 of file MachineShMemWinVariable.h.

Constructor & Destructor Documentation

◆ MachineShMemWinVariableArray2T()

template<class DataType>
Arcane::MachineShMemWinVariableArray2T< DataType >::MachineShMemWinVariableArray2T ( VariableRefArray2T< DataType > var)
explicit

Constructor.

Parameters
varVariable having the property "IVariable::PInShMem".

Definition at line 168 of file MachineShMemWinVariable.cc.

References Arcane::makeRef(), and updateVariable().

Member Function Documentation

◆ barrier()

template<class DataType>
void Arcane::MachineShMemWinVariableArray2T< DataType >::barrier ( ) const

Method allowing waiting until all processes/threads on the node call this method to continue execution.

Definition at line 197 of file MachineShMemWinVariable.cc.

◆ machineRanks()

template<class DataType>
ConstArrayView< Int32 > Arcane::MachineShMemWinVariableArray2T< DataType >::machineRanks ( ) const

Method allowing retrieval of ranks that possess a segment in the window.

Non-collective call.

Returns
A view containing the rank IDs.

Definition at line 187 of file MachineShMemWinVariable.cc.

◆ updateVariable()

template<class DataType>
void Arcane::MachineShMemWinVariableArray2T< DataType >::updateVariable ( )

Method allowing updating this object after a resizing of the variable.

Collective call.

Definition at line 218 of file MachineShMemWinVariable.cc.

Referenced by MachineShMemWinVariableArray2T().

◆ view()

template<class DataType>
Span2< DataType > Arcane::MachineShMemWinVariableArray2T< DataType >::view ( Int32 rank) const

Method allowing retrieval of a view on the array of another subdomain on the node.

Non-collective call.

Parameters
rankThe rank of the subdomain.
Returns
A 2D view.

Definition at line 207 of file MachineShMemWinVariable.cc.

References Arcane::asSpan(), and Arcane::SpanImpl< T, SizeType, Extent >::data().


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