Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::MachineShMemWinVariableArrayT< 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

 MachineShMemWinVariableArrayT (VariableRefArrayT< DataType > var)
 Constructor.
Span< 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.
Public Member Functions inherited from Arcane::MachineShMemWinVariableCommon
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.

Additional Inherited Members

Protected Member Functions inherited from Arcane::MachineShMemWinVariableCommon
 MachineShMemWinVariableCommon (IVariable *var)
 Constructor.
Protected Attributes inherited from Arcane::MachineShMemWinVariableCommon
Ref< MachineShMemWinVariableBase > m_base

Detailed Description

template<class DataType>
class Arcane::MachineShMemWinVariableArrayT< 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 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 111 of file MachineShMemWinVariable.h.

Constructor & Destructor Documentation

◆ MachineShMemWinVariableArrayT()

template<class DataType>
Arcane::MachineShMemWinVariableArrayT< DataType >::MachineShMemWinVariableArrayT ( VariableRefArrayT< DataType > var)
explicit

Constructor.

Parameters
varVariable having the property "PInShMem".

Definition at line 74 of file MachineShMemWinVariable.cc.

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

Member Function Documentation

◆ updateVariable()

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

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

Collective call.

Definition at line 103 of file MachineShMemWinVariable.cc.

Referenced by MachineShMemWinVariableArrayT().

◆ view()

template<class DataType>
Span< DataType > Arcane::MachineShMemWinVariableArrayT< DataType >::view ( Int32 rank) const

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

Equivalent to "var.asArray()" but for another subdomain.

Non-collective call.

Parameters
rankThe rank of the subdomain.
Returns
A view.

Definition at line 93 of file MachineShMemWinVariable.cc.

References Arcane::asSpan().


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