VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
CbVectorPool< T > Class Template Reference

#include <CbVectorPool.h>

Inheritance diagram for CbVectorPool< T >:
TbCbVectorMpiPool< T >

Public Types

using value_type = typename CbVector< T >::value_type
 
using size_type = typename CbVector< T >::size_type
 
using Pool = std::vector< value_type >
 
using CbVectorKey = std::string
 
using CbVectorMap = std::map< CbVectorKey, CbVector< value_type > * >
 
using CbVectorMapIter = typename CbVectorMap::iterator
 

Public Member Functions

 CbVectorPool (const size_type &startPoolSize=20000)
 
virtual ~CbVectorPool ()
 
CbVectorKey getNextCbVectorKey () const
 
bool allocVectorData (CbVector< value_type > &vec, const size_type &dataSize, const value_type &value=value_type())
 
bool resizeVectorData (CbVector< value_type > &vec, const size_type &dataSize, const value_type &value=value_type())
 
bool deallocVectorData (CbVector< value_type > &vec)
 
CbVectorMap::size_type getNofStoredVectors () const
 
Pool::size_type getPoolSize () const
 
bool consistencyCheck ()
 

Protected Member Functions

bool allocData (CbVectorAllocatorPool< value_type > &allocator, CbVector< value_type > &vec, const size_type &dataSize, const value_type &value)
 
bool resizeData (CbVectorAllocatorPool< value_type > &allocator, CbVector< value_type > &vec, const size_type &dataSize, const value_type &value)
 
void getCbVectorData (const CbVector< value_type > &vec, CbVectorKey &vectorKey, size_type &startIndexInPool, size_type &dataSize)
 
void setCbVectorData (CbVector< value_type > &vec, const CbVectorKey &vectorKey, const size_type &startIndexInPool, const size_type &dataSize)
 

Protected Attributes

CbVectorMap cbVectorMap
 
Pool pool
 
Pool::pointer poolStartAdress
 
Pool::size_type nextCbVectorStartIndexInPool
 
CbVectorKey nextCbVectorKey
 

Friends

std::ostream & operator<< (std::ostream &os, const CbVectorPool &cbPool)
 

Detailed Description

template<typename T>
class CbVectorPool< T >

Definition at line 93 of file CbVectorPool.h.

Member Typedef Documentation

◆ CbVectorKey

template<typename T >
using CbVectorPool< T >::CbVectorKey = std::string

Definition at line 100 of file CbVectorPool.h.

◆ CbVectorMap

template<typename T >
using CbVectorPool< T >::CbVectorMap = std::map<CbVectorKey, CbVector<value_type> *>

Definition at line 101 of file CbVectorPool.h.

◆ CbVectorMapIter

template<typename T >
using CbVectorPool< T >::CbVectorMapIter = typename CbVectorMap::iterator

Definition at line 102 of file CbVectorPool.h.

◆ Pool

template<typename T >
using CbVectorPool< T >::Pool = std::vector<value_type>

Definition at line 98 of file CbVectorPool.h.

◆ size_type

template<typename T >
using CbVectorPool< T >::size_type = typename CbVector<T>::size_type

Definition at line 97 of file CbVectorPool.h.

◆ value_type

template<typename T >
using CbVectorPool< T >::value_type = typename CbVector<T>::value_type

Definition at line 96 of file CbVectorPool.h.

Constructor & Destructor Documentation

◆ CbVectorPool()

template<typename T >
CbVectorPool< T >::CbVectorPool ( const size_type &  startPoolSize = 20000)
inline

Definition at line 106 of file CbVectorPool.h.

◆ ~CbVectorPool()

template<typename T >
virtual CbVectorPool< T >::~CbVectorPool ( )
inlinevirtual

Definition at line 112 of file CbVectorPool.h.

Member Function Documentation

◆ allocData()

template<typename T >
bool CbVectorPool< T >::allocData ( CbVectorAllocatorPool< value_type > &  allocator,
CbVector< value_type > &  vec,
const size_type &  dataSize,
const value_type &  value 
)
inlineprotected

Definition at line 283 of file CbVectorPool.h.

◆ allocVectorData()

template<typename T >
bool CbVectorPool< T >::allocVectorData ( CbVector< value_type > &  vec,
const size_type &  dataSize,
const value_type &  value = value_type() 
)
inline

Definition at line 135 of file CbVectorPool.h.

◆ consistencyCheck()

template<typename T >
bool CbVectorPool< T >::consistencyCheck ( )
inline

Definition at line 257 of file CbVectorPool.h.

◆ deallocVectorData()

template<typename T >
bool CbVectorPool< T >::deallocVectorData ( CbVector< value_type > &  vec)
inline

Definition at line 174 of file CbVectorPool.h.

◆ getCbVectorData()

template<typename T >
void CbVectorPool< T >::getCbVectorData ( const CbVector< value_type > &  vec,
CbVectorKey &  vectorKey,
size_type &  startIndexInPool,
size_type &  dataSize 
)
inlineprotected

Definition at line 395 of file CbVectorPool.h.

◆ getNextCbVectorKey()

template<typename T >
CbVectorKey CbVectorPool< T >::getNextCbVectorKey ( ) const
inline

Definition at line 133 of file CbVectorPool.h.

◆ getNofStoredVectors()

template<typename T >
CbVectorMap::size_type CbVectorPool< T >::getNofStoredVectors ( ) const
inline

Definition at line 252 of file CbVectorPool.h.

◆ getPoolSize()

template<typename T >
Pool::size_type CbVectorPool< T >::getPoolSize ( ) const
inline

Definition at line 254 of file CbVectorPool.h.

◆ resizeData()

template<typename T >
bool CbVectorPool< T >::resizeData ( CbVectorAllocatorPool< value_type > &  allocator,
CbVector< value_type > &  vec,
const size_type &  dataSize,
const value_type &  value 
)
inlineprotected

Definition at line 334 of file CbVectorPool.h.

◆ resizeVectorData()

template<typename T >
bool CbVectorPool< T >::resizeVectorData ( CbVector< value_type > &  vec,
const size_type &  dataSize,
const value_type &  value = value_type() 
)
inline

Definition at line 151 of file CbVectorPool.h.

◆ setCbVectorData()

template<typename T >
void CbVectorPool< T >::setCbVectorData ( CbVector< value_type > &  vec,
const CbVectorKey &  vectorKey,
const size_type &  startIndexInPool,
const size_type &  dataSize 
)
inlineprotected

Definition at line 406 of file CbVectorPool.h.

Friends And Related Symbol Documentation

◆ operator<<

template<typename T >
std::ostream & operator<< ( std::ostream &  os,
const CbVectorPool< T > &  cbPool 
)
friend

Definition at line 230 of file CbVectorPool.h.

Member Data Documentation

◆ cbVectorMap

template<typename T >
CbVectorMap CbVectorPool< T >::cbVectorMap
protected

Definition at line 419 of file CbVectorPool.h.

◆ nextCbVectorKey

template<typename T >
CbVectorKey CbVectorPool< T >::nextCbVectorKey
protected

Definition at line 426 of file CbVectorPool.h.

◆ nextCbVectorStartIndexInPool

template<typename T >
Pool::size_type CbVectorPool< T >::nextCbVectorStartIndexInPool
protected

Definition at line 423 of file CbVectorPool.h.

◆ pool

template<typename T >
Pool CbVectorPool< T >::pool
protected

Definition at line 421 of file CbVectorPool.h.

◆ poolStartAdress

template<typename T >
Pool::pointer CbVectorPool< T >::poolStartAdress
protected

Definition at line 422 of file CbVectorPool.h.


The documentation for this class was generated from the following file: