Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::MachineShMemWinMeshVariableScalarT< ItemType, DataType > Class Template Reference

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

#include <arcane/core/MachineShMemWinVariable.h>

Inheritance diagram for Arcane::MachineShMemWinMeshVariableScalarT< ItemType, DataType >:
Collaboration diagram for Arcane::MachineShMemWinMeshVariableScalarT< ItemType, DataType >:

Public Member Functions

 MachineShMemWinMeshVariableScalarT (MeshVariableScalarRefT< ItemType, DataType > var)
 Constructor.
Span< DataType > view (Int32 rank) const
 Method allowing retrieval of a view on the variable of another subdomain on the node.
DataType operator() (Int32 rank, Int32 notlocal_id)
 Method allowing retrieval of an element of the variable from another subdomain.
void updateVariable ()
 Method allowing updating this object after a change in the mesh.
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.

Private Attributes

MeshVariableScalarRefT< ItemType, DataType > m_vart

Additional Inherited Members

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

Detailed Description

template<class ItemType, class DataType>
class Arcane::MachineShMemWinMeshVariableScalarT< ItemType, 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 mesh scalar variables.

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

Definition at line 171 of file MachineShMemWinVariable.h.

Constructor & Destructor Documentation

◆ MachineShMemWinMeshVariableScalarT()

template<class ItemType, class DataType>
Arcane::MachineShMemWinMeshVariableScalarT< ItemType, DataType >::MachineShMemWinMeshVariableScalarT ( MeshVariableScalarRefT< ItemType, DataType > var)
explicit

Constructor.

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

Definition at line 116 of file MachineShMemWinVariable.cc.

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

Here is the call graph for this function:

Member Function Documentation

◆ operator()()

template<class ItemType, class DataType>
DataType Arcane::MachineShMemWinMeshVariableScalarT< ItemType, DataType >::operator() ( Int32 rank,
Int32 notlocal_id )

Method allowing retrieval of an element of the variable from another subdomain.

Warning
Attention: The local_id corresponds to the local_id of the subdomain rank! Absolutely do not use a local_id from our subdomain to access the elements of the view!
Note
If multiple iterations are necessary for the same rank, it is preferable to retrieve a view via segmentView(Int32 rank).

Non-collective call.

Parameters
rankThe rank of the subdomain of the targeted variable.
notlocal_idThe local_id of the subdomain rank.
Returns
The item element.

Definition at line 145 of file MachineShMemWinVariable.cc.

References view().

Here is the call graph for this function:

◆ updateVariable()

template<class ItemType, class DataType>
void Arcane::MachineShMemWinMeshVariableScalarT< ItemType, DataType >::updateVariable ( )

Method allowing updating this object after a change in the mesh.

Collective call.

Definition at line 155 of file MachineShMemWinVariable.cc.

Referenced by MachineShMemWinMeshVariableScalarT().

Here is the caller graph for this function:

◆ view()

template<class ItemType, class DataType>
Span< DataType > Arcane::MachineShMemWinMeshVariableScalarT< ItemType, DataType >::view ( Int32 rank) const

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

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

Warning
Attention: To access the elements of the view, it is necessary to use the local_ids of the other subdomain! Do not use the local_ids of our subdomain!

Non-collective call.

Parameters
rankThe rank of the subdomain.
Returns
A view.

Definition at line 135 of file MachineShMemWinVariable.cc.

References Arcane::asSpan().

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_vart

template<class ItemType, class DataType>
MeshVariableScalarRefT<ItemType, DataType> Arcane::MachineShMemWinMeshVariableScalarT< ItemType, DataType >::m_vart
private

Definition at line 233 of file MachineShMemWinVariable.h.


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