Container to hold a sets of transactions (sends/recvs) indexed by fragment and proc, intended to facilitate moving fragment pieces around. More...
#include <vtkMaterialInterfacePieceTransactionMatrix.h>
Public Member Functions | |
vtkMaterialInterfacePieceTransactionMatrix () | |
Set the object to an un-initialized state. More... | |
vtkMaterialInterfacePieceTransactionMatrix (int nFragments, int nProcs) | |
Allocate internal resources and set the object to an initialized state. More... | |
void | Clear () |
Free allocated resources and leave the object in an un-initialized state. More... | |
vtkIdType | GetNumberOfTransactions (int procId) |
Get the number of transaction a given process will execute. More... | |
std::vector< vtkMaterialInterfacePieceTransaction > & | GetTransactions (int fragmentId, int procId) |
Given a proc and a fragment, return a ref to the associated list of transactions. More... | |
void | PushTransaction (int fragmentId, int procId, vtkMaterialInterfacePieceTransaction &transaction) |
Add a transaction to the end of the given a proc,fragment pair's transaction list. More... | |
vtkIdType | Capacity () |
Tells how much memory the matrix has allocated. More... | |
~vtkMaterialInterfacePieceTransactionMatrix () | |
Free allocated resources and leave the object in an un-initialized state. More... | |
void | Initialize (int nFragments, int nProcs) |
Free allocated resources and leave the object in an un-initialized state. More... | |
void | Broadcast (vtkCommunicator *comm, int srcProc) |
Send the transaction matrix on srcProc to all other procs. More... | |
void | Print () |
Send the transaction matrix on srcProc to all other procs. More... | |
Container to hold a sets of transactions (sends/recvs) indexed by fragment and proc, intended to facilitate moving fragment pieces around.
Internally we have a 2D matrix. On one axis is fragment id on the other is proc id.
Transaction are intended to execute in fragment order so that no deadlocks occur.
Definition at line 28 of file vtkMaterialInterfacePieceTransactionMatrix.h.
vtkMaterialInterfacePieceTransactionMatrix::vtkMaterialInterfacePieceTransactionMatrix | ( | ) |
Set the object to an un-initialized state.
vtkMaterialInterfacePieceTransactionMatrix::vtkMaterialInterfacePieceTransactionMatrix | ( | int | nFragments, |
int | nProcs | ||
) |
Allocate internal resources and set the object to an initialized state.
vtkMaterialInterfacePieceTransactionMatrix::~vtkMaterialInterfacePieceTransactionMatrix | ( | ) |
Free allocated resources and leave the object in an un-initialized state.
Free allocated resources and leave the object in an un-initialized state.
void vtkMaterialInterfacePieceTransactionMatrix::Clear | ( | ) |
Free allocated resources and leave the object in an un-initialized state.
Get the number of transaction a given process will execute.
Definition at line 122 of file vtkMaterialInterfacePieceTransactionMatrix.h.
|
inline |
Given a proc and a fragment, return a ref to the associated list of transactions.
Definition at line 116 of file vtkMaterialInterfacePieceTransactionMatrix.h.
void vtkMaterialInterfacePieceTransactionMatrix::PushTransaction | ( | int | fragmentId, |
int | procId, | ||
vtkMaterialInterfacePieceTransaction & | transaction | ||
) |
Add a transaction to the end of the given a proc,fragment pair's transaction list.
void vtkMaterialInterfacePieceTransactionMatrix::Broadcast | ( | vtkCommunicator * | comm, |
int | srcProc | ||
) |
Send the transaction matrix on srcProc to all other procs.
void vtkMaterialInterfacePieceTransactionMatrix::Print | ( | ) |
Send the transaction matrix on srcProc to all other procs.
|
inline |
Tells how much memory the matrix has allocated.
Definition at line 81 of file vtkMaterialInterfacePieceTransactionMatrix.h.