|
TRUST 1.9.8
HPC thermohydraulic platform
|
#include <TRUSTTravPool.h>
Public Types | |
| using | block_ptr_t = std::shared_ptr<std::vector<_TYPE_, TVAlloc<_TYPE_> > > |
Public Member Functions | |
| TRUSTTravPool ()=delete | |
Static Public Member Functions | |
| static block_ptr_t | GetFreeBlock (int sz) |
| static block_ptr_t | ResizeBlock (block_ptr_t p, int new_sz) |
| static void | ReleaseBlock (block_ptr_t) |
| static void | ClearPool () |
| static void | DeleteOnDevice () |
| static void | PrintStats () |
Pool of memory blocks used when requesting temporary storage (Trav arrays)
Purely static methods. One pool per base type (int, double, etc...).
The implementation details are in the .cpp file.
Definition at line 31 of file TRUSTTravPool.h.
| using TRUSTTravPool< _TYPE_ >::block_ptr_t = std::shared_ptr<std::vector<_TYPE_, TVAlloc<_TYPE_> > > |
Definition at line 34 of file TRUSTTravPool.h.
|
delete |
|
static |
Empty the TRUSTTrav pool explicitely.
Definition at line 235 of file TRUSTTravPool.cpp.
|
static |
|
static |
Retrieve a free block of size sz.
This takes the last available block from the list of the corresponding size, or returns a newly allocated block if none is available in the block.
Definition at line 115 of file TRUSTTravPool.cpp.
|
static |
Debug method printing useful stats.
Definition at line 261 of file TRUSTTravPool.cpp.
|
static |
Release a block.
This is invoked from the dtor of TRUSTArray and makes the memory block available again by registering it in the pool of free blocks. We don't register blocks of size 0.
Definition at line 200 of file TRUSTTravPool.cpp.
|
static |
"Resize" a temporary Trav block - two possible strategies: Strategy 1
Definition at line 164 of file TRUSTTravPool.cpp.