FST  openfst-1.8.3
OpenFst Library
Classes | Public Types | Public Member Functions | List of all members
fst::PoolAllocator< T > Class Template Reference

#include <memory.h>

Public Types

using Allocator = std::allocator< T >
 
using size_type = typename Allocator::size_type
 
using value_type = typename Allocator::value_type
 

Public Member Functions

 PoolAllocator (size_t pool_size=kAllocSize)
 
template<typename U >
 PoolAllocator (const PoolAllocator< U > &pool_alloc)
 
T * allocate (size_type n, const void *hint=nullptr)
 
void deallocate (T *p, size_type n)
 
std::shared_ptr< MemoryPoolCollectionPools () const
 

Detailed Description

template<typename T>
class fst::PoolAllocator< T >

Definition at line 282 of file memory.h.

Member Typedef Documentation

template<typename T>
using fst::PoolAllocator< T >::Allocator = std::allocator<T>

Definition at line 284 of file memory.h.

template<typename T>
using fst::PoolAllocator< T >::size_type = typename Allocator::size_type

Definition at line 285 of file memory.h.

template<typename T>
using fst::PoolAllocator< T >::value_type = typename Allocator::value_type

Definition at line 286 of file memory.h.

Constructor & Destructor Documentation

template<typename T>
fst::PoolAllocator< T >::PoolAllocator ( size_t  pool_size = kAllocSize)
inlineexplicit

Definition at line 288 of file memory.h.

template<typename T>
template<typename U >
fst::PoolAllocator< T >::PoolAllocator ( const PoolAllocator< U > &  pool_alloc)
inlineexplicit

Definition at line 292 of file memory.h.

Member Function Documentation

template<typename T>
T* fst::PoolAllocator< T >::allocate ( size_type  n,
const void *  hint = nullptr 
)
inline

Definition at line 295 of file memory.h.

template<typename T>
void fst::PoolAllocator< T >::deallocate ( T *  p,
size_type  n 
)
inline

Definition at line 316 of file memory.h.

template<typename T>
std::shared_ptr<MemoryPoolCollection> fst::PoolAllocator< T >::Pools ( ) const
inline

Definition at line 336 of file memory.h.


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