Class allowing access to the shared elements of the variable in shared memory. More...
#include <arcane/core/MachineShMemWinVariable.h>
Public Member Functions | |
| MachineShMemWinMeshVariableArrayT (MeshVariableArrayRefT< ItemType, DataType > var) | |
| Constructor. | |
| ConstArrayView< Int32 > | machineRanks () const |
| Method to get the ranks that possess a segment in the window. | |
| void | barrier () const |
| Method to wait until all processes/threads on the node call this method to continue execution. | |
| Span2< DataType > | view (Int32 rank) const |
| Method to get a view of the variable from another subdomain on the node. | |
| Span< DataType > | operator() (Int32 rank, Int32 notlocal_id) |
| Method to get the array of an item from another subdomain. | |
| void | updateVariable () |
| Method to update this object after a change in the mesh and/or after a resizing of the variable. | |
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 array variables.
If the mesh and/or the variable size changes when an object of this type is used, it is necessary to call the updateVariable() method.
Definition at line 331 of file MachineShMemWinVariable.h.
|
explicit |
Constructor.
| var | Variable having the property "IVariable::PInShMem". |
Definition at line 234 of file MachineShMemWinVariable.cc.
References Arcane::makeRef(), and updateVariable().
| void Arcane::MachineShMemWinMeshVariableArrayT< ItemType, DataType >::barrier | ( | ) | const |
Method to wait until all processes/threads on the node call this method to continue execution.
Definition at line 263 of file MachineShMemWinVariable.cc.
| ConstArrayView< Int32 > Arcane::MachineShMemWinMeshVariableArrayT< ItemType, DataType >::machineRanks | ( | ) | const |
Method to get the ranks that possess a segment in the window.
Non-collective call.
Definition at line 253 of file MachineShMemWinVariable.cc.
| Span< DataType > Arcane::MachineShMemWinMeshVariableArrayT< ItemType, DataType >::operator() | ( | Int32 | rank, |
| Int32 | notlocal_id ) |
Method to get the array of an item from another subdomain.
Non-collective call.
| rank | The rank of the targeted variable's subdomain. |
| notlocal_id | The local_id of the subdomain rank. |
Definition at line 284 of file MachineShMemWinVariable.cc.
References Arcane::asSpan(), and Arcane::SpanImpl< T, SizeType, Extent >::data().
| void Arcane::MachineShMemWinMeshVariableArrayT< ItemType, DataType >::updateVariable | ( | ) |
Method to update this object after a change in the mesh and/or after a resizing of the variable.
Collective call.
Definition at line 297 of file MachineShMemWinVariable.cc.
Referenced by MachineShMemWinMeshVariableArrayT().
| Span2< DataType > Arcane::MachineShMemWinMeshVariableArrayT< ItemType, DataType >::view | ( | Int32 | rank | ) | const |
Method to get a view of the variable from another subdomain on the node.
Equivalent to "var.asArray()" but from another subdomain. The first index corresponds to the local_id, the second index is the position of the element in the item array.
Non-collective call.
| rank | The subdomain rank. |
Definition at line 273 of file MachineShMemWinVariable.cc.
References Arcane::asSpan(), and Arcane::SpanImpl< T, SizeType, Extent >::data().