Nektar++
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Nektar::ObjPoolManager< DataType > Class Template Reference

Generic object pool allocator/deallocator. More...

#include <ObjectPool.hpp>

Classes

struct  UniquePtrDeleter
 

Public Member Functions

PoolAllocator< SpatialDomains::GeomFactorsm_alloc
 
PoolAllocator< SpatialDomains::PointGeomm_alloc
 
PoolAllocator< SpatialDomains::SegGeomm_alloc
 
PoolAllocator< SpatialDomains::TriGeomm_alloc
 
PoolAllocator< SpatialDomains::QuadGeomm_alloc
 
PoolAllocator< SpatialDomains::TetGeomm_alloc
 
PoolAllocator< SpatialDomains::PyrGeomm_alloc
 
PoolAllocator< SpatialDomains::PrismGeomm_alloc
 
PoolAllocator< SpatialDomains::HexGeomm_alloc
 
PoolAllocator< SpatialDomains::PointGeomm_alloc
 
PoolAllocator< SpatialDomains::SegGeomm_alloc
 

Static Public Member Functions

template<typename... Args>
static DataType * Allocate (const Args &...args)
 
static void Deallocate (DataType *ptr)
 
template<typename... Args>
static std::unique_ptr< DataType, UniquePtrDeleterAllocateUniquePtr (const Args &...args)
 

Static Public Attributes

static PoolAllocator< DataType > m_alloc
 

Detailed Description

template<typename DataType>
class Nektar::ObjPoolManager< DataType >

Generic object pool allocator/deallocator.

This class provides an allocator based on the boost::fast_pool_allocator for creating object pools.

Definition at line 60 of file ObjectPool.hpp.

Member Function Documentation

◆ Allocate()

template<typename DataType >
template<typename... Args>
static DataType * Nektar::ObjPoolManager< DataType >::Allocate ( const Args &...  args)
inlinestatic

Definition at line 63 of file ObjectPool.hpp.

64 {
65 DataType *ptr = m_alloc.allocate();
66 new (ptr) DataType(args...);
67 return ptr;
68 }
static PoolAllocator< DataType > m_alloc

References Nektar::ObjPoolManager< DataType >::m_alloc.

Referenced by Nektar::ObjPoolManager< DataType >::AllocateUniquePtr().

◆ AllocateUniquePtr()

template<typename DataType >
template<typename... Args>
static std::unique_ptr< DataType, UniquePtrDeleter > Nektar::ObjPoolManager< DataType >::AllocateUniquePtr ( const Args &...  args)
inlinestatic

◆ Deallocate()

template<typename DataType >
static void Nektar::ObjPoolManager< DataType >::Deallocate ( DataType *  ptr)
inlinestatic

Definition at line 70 of file ObjectPool.hpp.

71 {
72 return m_alloc.deallocate(ptr);
73 }

References Nektar::ObjPoolManager< DataType >::m_alloc.

Referenced by Nektar::ObjPoolManager< DataType >::UniquePtrDeleter::operator()().

◆ m_alloc() [1/11]

Definition at line 43 of file GeomFactors.cpp.

43{};

◆ m_alloc() [2/11]

Definition at line 64 of file MeshGraph.h.

◆ m_alloc() [3/11]

Definition at line 67 of file MeshGraph.h.

◆ m_alloc() [4/11]

Definition at line 70 of file MeshGraph.h.

◆ m_alloc() [5/11]

Definition at line 73 of file MeshGraph.h.

◆ m_alloc() [6/11]

Definition at line 76 of file MeshGraph.h.

◆ m_alloc() [7/11]

Definition at line 79 of file MeshGraph.h.

◆ m_alloc() [8/11]

Definition at line 82 of file MeshGraph.h.

◆ m_alloc() [9/11]

Definition at line 85 of file MeshGraph.h.

◆ m_alloc() [10/11]

Definition at line 50 of file SegGeom.cpp.

◆ m_alloc() [11/11]

Definition at line 53 of file SegGeom.cpp.

Member Data Documentation

◆ m_alloc

template<typename DataType >
PoolAllocator<DataType> Nektar::ObjPoolManager< DataType >::m_alloc
static