NeoPZ
|
List of items to assembling using Dohrmann algorithm. More...
#include <tpzdohrassemblelist.h>
Public Member Functions | |
TPZDohrAssembleList (int numitems, TPZFMatrix< TVar > &output, TPZAutoPointer< TPZDohrAssembly< TVar > > assembly) | |
Constructor indicating the number of items that will be assembled and the target matrix. More... | |
~TPZDohrAssembleList () | |
destructor More... | |
void | AddItem (TPZAutoPointer< TPZDohrAssembleItem< TVar > > assembleItem) |
Add an item to the list in a thread safe way. More... | |
TPZAutoPointer< TPZDohrAssembleItem< TVar > > | PopItem () |
Remove an item from the list. More... | |
Static Public Member Functions | |
static void * | Assemble (void *voidptr) |
Procedure which performs the assembly process. More... | |
Public Attributes | |
int | fNumItems |
The number of items that will be assembled before returning. More... | |
TPZSemaphore | fSemaphore |
Semaphore (to wake up assembly thread) More... | |
pthread_mutex_t | fListAccessLock |
This is the mutex which controls the access to the list. More... | |
pthread_mutex_t | fAssemblyLock |
This is the mutex which controls the assembly. More... | |
std::list< TPZAutoPointer< TPZDohrAssembleItem< TVar > > > | fWork |
List of objects needed to be assembled. More... | |
TPZAutoPointer< TPZDohrAssembly< TVar > > | fAssembleIndexes |
Assembly indexes. More... | |
TPZFMatrix< TVar > * | fOutput |
Target Matrix. More... | |
List of items to assembling using Dohrmann algorithm.
Definition at line 44 of file tpzdohrassemblelist.h.
TPZDohrAssembleList< TVar >::TPZDohrAssembleList | ( | int | numitems, |
TPZFMatrix< TVar > & | output, | ||
TPZAutoPointer< TPZDohrAssembly< TVar > > | assembly | ||
) |
Constructor indicating the number of items that will be assembled and the target matrix.
Definition at line 11 of file tpzdohrassemblelist.cpp.
References TPZDohrAssembleList< TVar >::fAssemblyLock, TPZDohrAssembleList< TVar >::fListAccessLock, and PZ_PTHREAD_MUTEX_INIT.
TPZDohrAssembleList< TVar >::~TPZDohrAssembleList | ( | ) |
destructor
Definition at line 19 of file tpzdohrassemblelist.cpp.
References TPZDohrAssembleList< TVar >::fAssemblyLock, TPZDohrAssembleList< TVar >::fListAccessLock, and PZ_PTHREAD_MUTEX_DESTROY.
void TPZDohrAssembleList< TVar >::AddItem | ( | TPZAutoPointer< TPZDohrAssembleItem< TVar > > | assembleItem | ) |
Add an item to the list in a thread safe way.
Definition at line 27 of file tpzdohrassemblelist.cpp.
References TPZDohrAssembleList< TVar >::fListAccessLock, TPZDohrAssembleList< TVar >::fSemaphore, TPZDohrAssembleList< TVar >::fWork, TPZSemaphore::Post(), PZ_PTHREAD_MUTEX_LOCK, and PZ_PTHREAD_MUTEX_UNLOCK.
Referenced by TPZDohrPrecond< TVar, TSubStruct >::MultAdd(), and TPZDohrMatrix< TVar, TSubStruct >::MultAdd().
|
static |
Procedure which performs the assembly process.
Definition at line 50 of file tpzdohrassemblelist.cpp.
References TPZDohrAssembleList< TVar >::fAssembleIndexes, TPZDohrAssembleList< TVar >::fAssemblyLock, TPZDohrAssembleList< TVar >::fNumItems, TPZDohrAssembleList< TVar >::fOutput, TPZDohrAssembleList< TVar >::fSemaphore, TPZDohrAssembleList< TVar >::PopItem(), PZ_PTHREAD_MUTEX_LOCK, PZ_PTHREAD_MUTEX_UNLOCK, and TPZSemaphore::Wait().
TPZAutoPointer< TPZDohrAssembleItem< TVar > > TPZDohrAssembleList< TVar >::PopItem | ( | ) |
Remove an item from the list.
Definition at line 36 of file tpzdohrassemblelist.cpp.
References TPZDohrAssembleList< TVar >::fListAccessLock, TPZDohrAssembleList< TVar >::fNumItems, TPZDohrAssembleList< TVar >::fWork, PZ_PTHREAD_MUTEX_LOCK, and PZ_PTHREAD_MUTEX_UNLOCK.
Referenced by TPZDohrAssembleList< TVar >::Assemble().
TPZAutoPointer<TPZDohrAssembly<TVar> > TPZDohrAssembleList< TVar >::fAssembleIndexes |
Assembly indexes.
Definition at line 64 of file tpzdohrassemblelist.h.
Referenced by TPZDohrAssembleList< TVar >::Assemble().
pthread_mutex_t TPZDohrAssembleList< TVar >::fAssemblyLock |
This is the mutex which controls the assembly.
Definition at line 56 of file tpzdohrassemblelist.h.
Referenced by TPZDohrAssembleList< TVar >::Assemble(), TPZDohrAssembleList< TVar >::TPZDohrAssembleList(), and TPZDohrAssembleList< TVar >::~TPZDohrAssembleList().
pthread_mutex_t TPZDohrAssembleList< TVar >::fListAccessLock |
This is the mutex which controls the access to the list.
Definition at line 54 of file tpzdohrassemblelist.h.
Referenced by TPZDohrAssembleList< TVar >::AddItem(), TPZDohrAssembleList< TVar >::PopItem(), TPZDohrAssembleList< TVar >::TPZDohrAssembleList(), and TPZDohrAssembleList< TVar >::~TPZDohrAssembleList().
int TPZDohrAssembleList< TVar >::fNumItems |
The number of items that will be assembled before returning.
Definition at line 50 of file tpzdohrassemblelist.h.
Referenced by TPZDohrAssembleList< TVar >::Assemble(), and TPZDohrAssembleList< TVar >::PopItem().
TPZFMatrix<TVar>* TPZDohrAssembleList< TVar >::fOutput |
Target Matrix.
Definition at line 66 of file tpzdohrassemblelist.h.
Referenced by TPZDohrAssembleList< TVar >::Assemble().
TPZSemaphore TPZDohrAssembleList< TVar >::fSemaphore |
Semaphore (to wake up assembly thread)
Definition at line 52 of file tpzdohrassemblelist.h.
Referenced by TPZDohrAssembleList< TVar >::AddItem(), and TPZDohrAssembleList< TVar >::Assemble().
std::list<TPZAutoPointer<TPZDohrAssembleItem<TVar> > > TPZDohrAssembleList< TVar >::fWork |
List of objects needed to be assembled.
Definition at line 58 of file tpzdohrassemblelist.h.
Referenced by TPZDohrAssembleList< TVar >::AddItem(), and TPZDohrAssembleList< TVar >::PopItem().