NeoPZ
|
#include <pzadmchunkthreadsafe.h>
Public Member Functions | |
TPZAdmChunkVectorThreadSafe< T, EXP > & | operator= (const TPZAdmChunkVectorThreadSafe< T, EXP > &TPZAdmCh) |
TPZAdmChunkVectorThreadSafe (const TPZAdmChunkVectorThreadSafe< T, EXP > &AdmCh) | |
TPZAdmChunkVectorThreadSafe (int numberofchunks=DEFAULTNUMBEROFCHUNKS) | |
virtual | ~TPZAdmChunkVectorThreadSafe () |
int | AllocateNewElement () |
void | SetFree (int index) |
int | NFreeElements () |
int | NElements () const |
void | CompactDataStructure (int type=2) |
int | PrintFree (int i) |
void | Resize (const int newsize) |
T & | operator[] (const int nelem) const |
int | FindObject (T *obj) |
Public Member Functions inherited from TPZAdmChunkVector< T, EXP > | |
TPZAdmChunkVector< T, EXP > & | operator= (const TPZAdmChunkVector< T, EXP > &TPZAdmCh) |
Assignment operator. More... | |
TPZAdmChunkVector (const TPZAdmChunkVector< T, EXP > &AdmCh) | |
Copy constructor. More... | |
TPZAdmChunkVector (int numberofchunks=DEFAULTNUMBEROFCHUNKS) | |
Constructor. More... | |
virtual | ~TPZAdmChunkVector () |
Destructor. More... | |
int | AllocateNewElement () |
Makes more room for new elements. More... | |
void | SetFree (int index) |
Indicate an element as free. More... | |
int64_t | NFreeElements () const |
Access method to return the number of free elements. More... | |
void | CompactDataStructure (CompactScheme type=CompactScheme::ALWAYS) |
Sets the method to compact the data structure based on the. More... | |
int | PrintFree (int i) |
Print index i into the fFree vector. More... | |
void | Resize (const int newsize) |
Increase the size of the chunk vector. More... | |
int | ClassId () const override |
Define the class id associated with the class. More... | |
void | Read (TPZStream &buf, void *context) override |
read objects from the stream More... | |
void | Write (TPZStream &buf, int withclassid) const override |
Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More... | |
Public Member Functions inherited from TPZChunkVector< T, EXP > | |
TPZChunkVector< T, EXP > & | operator= (const TPZChunkVector< T, EXP > &TCh) |
Assignment operator, copies all elements from the object TCh. More... | |
TPZChunkVector (const TPZChunkVector< T, EXP > &TCh) | |
Copy constructor. More... | |
TPZChunkVector (int64_t numberofchunks=DEFAULTNUMBEROFCHUNKS) | |
Constructor with numberofchunks chunks. More... | |
virtual | ~TPZChunkVector () |
Destructor. More... | |
iterator | begin () |
const_iterator | begin () const |
const_iterator | cbegin () const |
iterator | end () |
const_iterator | end () const |
const_iterator | cend () const |
int64_t | NElements () const |
Access method to query the number of elements of the vector. More... | |
void | Resize (const int64_t newsize) |
Increase the size of the chunk vector. More... | |
T & | operator[] (const int64_t nelem) const |
Returns a reference to the ith element of the vector. More... | |
int64_t | FindObject (T *object) |
Finds the index of an object by its pointer. More... | |
int | ClassId () const override |
Define the class id associated with the class. More... | |
void | Read (TPZStream &buf, void *context) override |
read objects from the stream More... | |
void | Write (TPZStream &buf, int withclassid) const override |
Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More... | |
Public Member Functions inherited from TPZSavable | |
TPZSavable () | |
virtual | ~TPZSavable () |
virtual std::list< std::map< std::string, uint64_t > > | VersionHistory () const |
virtual std::pair< std::string, uint64_t > | Version () const |
virtual bool | Compare (TPZSavable *copy, bool override=false) |
Compares the object for identity with the object pointed to, eventually copy the object. More... | |
virtual bool | Compare (TPZSavable *copy, bool override=false) const |
Compares the object for identity with the object pointed to, eventually copy the object. More... | |
Public Member Functions inherited from TPZRegisterClassId | |
template<typename T > | |
TPZRegisterClassId (int(T::*)() const) | |
TPZRegisterClassId ()=default | |
Private Attributes | |
pthread_mutex_t | fAdmChunkVectorLock |
Additional Inherited Members | |
Public Types inherited from TPZAdmChunkVector< T, EXP > | |
enum | CompactScheme { NEVER, NOW, ALWAYS } |
Public Types inherited from TPZChunkVector< T, EXP > | |
typedef T | value_type |
typedef value_type * | pointer |
typedef const value_type * | const_pointer |
typedef TPZChunkVectorIterator< false, value_type, EXP > | iterator |
typedef TPZChunkVectorIterator< true, value_type, EXP > | const_iterator |
typedef value_type & | reference |
typedef const value_type & | const_reference |
typedef int64_t | size_type |
Static Public Member Functions inherited from TPZSavable | |
static std::set< TPZRestoreClassBase * > & | RestoreClassSet () |
This static function guarantees that the gMap object is available when needed. More... | |
static std::map< int, TPZRestore_t > & | ClassIdMap () |
This static function guarantees that the gMap object is available when needed. More... | |
static std::pair< std::string, uint64_t > | NeoPZVersion () |
static void | Register (TPZRestoreClassBase *restore) |
static void | RegisterClassId (int classid, TPZRestore_t fun) |
static TPZSavable * | CreateInstance (const int &classId) |
Protected Attributes inherited from TPZChunkVector< T, EXP > | |
int64_t | fNElements |
Number of elements of the chunk vector. More... | |
TPZManVector< T * > | fVec |
Vector which points to each chunk of objects. More... | |
Definition at line 15 of file pzadmchunkthreadsafe.h.
TPZAdmChunkVectorThreadSafe< T, EXP >::TPZAdmChunkVectorThreadSafe | ( | const TPZAdmChunkVectorThreadSafe< T, EXP > & | AdmCh | ) |
Definition at line 116 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock.
TPZAdmChunkVectorThreadSafe< T, EXP >::TPZAdmChunkVectorThreadSafe | ( | int | numberofchunks = DEFAULTNUMBEROFCHUNKS | ) |
Definition at line 80 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock.
|
virtual |
Definition at line 86 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock.
int TPZAdmChunkVectorThreadSafe< T, EXP >::AllocateNewElement | ( | ) |
Definition at line 92 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVector< T, EXP >::AllocateNewElement(), and TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock.
void TPZAdmChunkVectorThreadSafe< T, EXP >::CompactDataStructure | ( | int | type = 2 | ) |
Definition at line 109 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVector< T, EXP >::CompactDataStructure(), and TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock.
int TPZAdmChunkVectorThreadSafe< T, EXP >::FindObject | ( | T * | obj | ) |
Definition at line 147 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock, and TPZChunkVector< T, EXP >::FindObject().
int TPZAdmChunkVectorThreadSafe< T, EXP >::NElements | ( | ) | const |
Definition at line 71 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock, and TPZChunkVector< T, EXP >::NElements().
int TPZAdmChunkVectorThreadSafe< T, EXP >::NFreeElements | ( | ) |
Definition at line 53 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock, and TPZAdmChunkVector< T, EXP >::NFreeElements().
TPZAdmChunkVectorThreadSafe< T, EXP > & TPZAdmChunkVectorThreadSafe< T, EXP >::operator= | ( | const TPZAdmChunkVectorThreadSafe< T, EXP > & | TPZAdmCh | ) |
Definition at line 122 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock.
|
inline |
Definition at line 138 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock, and TPZChunkVector< T, EXP >::operator[]().
int TPZAdmChunkVectorThreadSafe< T, EXP >::PrintFree | ( | int | i | ) |
Definition at line 62 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock, and TPZAdmChunkVector< T, EXP >::PrintFree().
void TPZAdmChunkVectorThreadSafe< T, EXP >::Resize | ( | const int | newsize | ) |
Definition at line 131 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock, and TPZAdmChunkVector< T, EXP >::Resize().
void TPZAdmChunkVectorThreadSafe< T, EXP >::SetFree | ( | int | index | ) |
Definition at line 102 of file pzadmchunkthreadsafe.h.
References TPZAdmChunkVectorThreadSafe< T, EXP >::fAdmChunkVectorLock, and TPZAdmChunkVector< T, EXP >::SetFree().
|
mutableprivate |
Definition at line 46 of file pzadmchunkthreadsafe.h.
Referenced by TPZAdmChunkVectorThreadSafe< T, EXP >::AllocateNewElement(), TPZAdmChunkVectorThreadSafe< T, EXP >::CompactDataStructure(), TPZAdmChunkVectorThreadSafe< T, EXP >::FindObject(), TPZAdmChunkVectorThreadSafe< T, EXP >::NElements(), TPZAdmChunkVectorThreadSafe< T, EXP >::NFreeElements(), TPZAdmChunkVectorThreadSafe< T, EXP >::operator=(), TPZAdmChunkVectorThreadSafe< T, EXP >::operator[](), TPZAdmChunkVectorThreadSafe< T, EXP >::PrintFree(), TPZAdmChunkVectorThreadSafe< T, EXP >::Resize(), TPZAdmChunkVectorThreadSafe< T, EXP >::SetFree(), TPZAdmChunkVectorThreadSafe< T, EXP >::TPZAdmChunkVectorThreadSafe(), and TPZAdmChunkVectorThreadSafe< T, EXP >::~TPZAdmChunkVectorThreadSafe().