header_utils
Loading...
Searching...
No Matches
ghassanpl::thread_local_pool< T, BLOCK_SIZE > Struct Template Reference

A pool that can be used in a thread-local fashion. More...

#include <pools.h>

Inherits ghassanpl::pool< T, 1024 >.

Public Types

using pooled_ptr

Public Member Functions

T * create (ARGS &&... args)
void destroy (T *ptr)
void clear ()
size_t capacity () const noexcept
size_t capacity_in_bytes () const noexcept
size_t free_elements () const noexcept
size_t allocated_elements () const noexcept

Static Public Member Functions

static auto & get_pool ()
template<typename... ARGS>
static pooled_ptr make_pooled (ARGS &&... args)

Detailed Description

template<typename T, size_t BLOCK_SIZE = 1024>
struct ghassanpl::thread_local_pool< T, BLOCK_SIZE >

A pool that can be used in a thread-local fashion.

Definition at line 61 of file pools.h.

Member Typedef Documentation

◆ pooled_ptr

template<typename T, size_t BLOCK_SIZE = 1024>
using ghassanpl::thread_local_pool< T, BLOCK_SIZE >::pooled_ptr

Definition at line 78 of file pools.h.

Member Function Documentation

◆ allocated_elements()

size_t ghassanpl::pool< T, BLOCK_SIZE >::allocated_elements ( ) const
inlinenoexceptinherited

Definition at line 49 of file pools.h.

◆ capacity()

size_t ghassanpl::pool< T, BLOCK_SIZE >::capacity ( ) const
inlinenoexceptinherited

Definition at line 46 of file pools.h.

◆ capacity_in_bytes()

size_t ghassanpl::pool< T, BLOCK_SIZE >::capacity_in_bytes ( ) const
inlinenoexceptinherited

Definition at line 47 of file pools.h.

◆ clear()

void ghassanpl::pool< T, BLOCK_SIZE >::clear ( )
inlineinherited

Definition at line 40 of file pools.h.

◆ create()

T * ghassanpl::pool< T, BLOCK_SIZE >::create ( ARGS &&... args)
inlineinherited

Definition at line 21 of file pools.h.

◆ destroy()

void ghassanpl::pool< T, BLOCK_SIZE >::destroy ( T * ptr)
inlineinherited

Definition at line 34 of file pools.h.

◆ free_elements()

size_t ghassanpl::pool< T, BLOCK_SIZE >::free_elements ( ) const
inlinenoexceptinherited

Definition at line 48 of file pools.h.

◆ get_pool()

template<typename T, size_t BLOCK_SIZE = 1024>
auto & ghassanpl::thread_local_pool< T, BLOCK_SIZE >::get_pool ( )
inlinestatic

Definition at line 64 of file pools.h.

◆ make_pooled()

template<typename T, size_t BLOCK_SIZE = 1024>
template<typename... ARGS>
pooled_ptr ghassanpl::thread_local_pool< T, BLOCK_SIZE >::make_pooled ( ARGS &&... args)
inlinestatic

Definition at line 81 of file pools.h.