TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
PoolImpl_< _TYPE_ > Struct Template Reference

Public Types

using ptr_t = std::shared_ptr<typename TRUSTArray<_TYPE_,int>::Vector_>
using list_t = std::list<ptr_t>
using pool_t = std::unordered_map<size_t, list_t>

Static Public Attributes

static pool_t Free_blocks_
static size_t req_sz_
 Total allocation requests:
static size_t actual_sz_
 Actual alloc performed:
static int num_items_
 Total number of blocks in the pool:

Detailed Description

template<typename _TYPE_>
struct PoolImpl_< _TYPE_ >

The shared pools of memory - visibility: here only.

Implementation is done as a map of lists. Key is the array size, and the list simply contains pointers to available free blocks. So a block is only registered in the list when it is released.

Definition at line 34 of file TRUSTTravPool.cpp.

Member Typedef Documentation

◆ list_t

template<typename _TYPE_>
using PoolImpl_< _TYPE_ >::list_t = std::list<ptr_t>

Definition at line 37 of file TRUSTTravPool.cpp.

◆ pool_t

template<typename _TYPE_>
using PoolImpl_< _TYPE_ >::pool_t = std::unordered_map<size_t, list_t>

Definition at line 38 of file TRUSTTravPool.cpp.

◆ ptr_t

template<typename _TYPE_>
using PoolImpl_< _TYPE_ >::ptr_t = std::shared_ptr<typename TRUSTArray<_TYPE_,int>::Vector_>

Definition at line 36 of file TRUSTTravPool.cpp.

Member Data Documentation

◆ actual_sz_

template<typename _TYPE_>
size_t PoolImpl_< _TYPE_ >::actual_sz_
static

Actual alloc performed:

Definition at line 50 of file TRUSTTravPool.cpp.

◆ Free_blocks_

template<typename _TYPE_>
pool_t PoolImpl_< _TYPE_ >::Free_blocks_
static

A pool is a map of lists:

  • key is the size of the block,
  • value is a list giving all free blocks (the last one is picked when requesting a free block)

Definition at line 44 of file TRUSTTravPool.cpp.

◆ num_items_

template<typename _TYPE_>
int PoolImpl_< _TYPE_ >::num_items_
static

Total number of blocks in the pool:

Definition at line 52 of file TRUSTTravPool.cpp.

◆ req_sz_

template<typename _TYPE_>
size_t PoolImpl_< _TYPE_ >::req_sz_
static

Total allocation requests:

Definition at line 48 of file TRUSTTravPool.cpp.


The documentation for this struct was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/cea-trust-platform/checkouts/v1.9.8/src/Kernel/Math/TRUSTTravPool.cpp