CPPuddle
Public Types | Public Member Functions | Public Attributes | List of all members
cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator > Struct Template Reference

#include <buffer_management.hpp>

Public Types

using value_type = T
 
using underlying_allocator_type = Host_Allocator
 

Public Member Functions

 recycle_allocator () noexcept
 
 recycle_allocator (size_t hint) noexcept
 
 recycle_allocator (recycle_allocator< T, Host_Allocator > const &other) noexcept
 
T * allocate (std::size_t n)
 
void deallocate (T *p, std::size_t n)
 
template<typename... Args>
void construct (T *p, Args... args) noexcept
 
void destroy (T *p)
 

Public Attributes

const std::optional< size_t > dealloc_hint
 
const std::optional< size_t > device_id
 

Member Typedef Documentation

◆ underlying_allocator_type

template<typename T , typename Host_Allocator >
using cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::underlying_allocator_type = Host_Allocator

◆ value_type

template<typename T , typename Host_Allocator >
using cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::value_type = T

Constructor & Destructor Documentation

◆ recycle_allocator() [1/3]

template<typename T , typename Host_Allocator >
cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::recycle_allocator ( )
inlinenoexcept

◆ recycle_allocator() [2/3]

template<typename T , typename Host_Allocator >
cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::recycle_allocator ( size_t  hint)
inlineexplicitnoexcept

◆ recycle_allocator() [3/3]

template<typename T , typename Host_Allocator >
cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::recycle_allocator ( recycle_allocator< T, Host_Allocator > const &  other)
inlineexplicitnoexcept

Member Function Documentation

◆ allocate()

template<typename T , typename Host_Allocator >
T* cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::allocate ( std::size_t  n)
inline

◆ construct()

template<typename T , typename Host_Allocator >
template<typename... Args>
void cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::construct ( T *  p,
Args...  args 
)
inlinenoexcept

◆ deallocate()

template<typename T , typename Host_Allocator >
void cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::deallocate ( T *  p,
std::size_t  n 
)
inline

◆ destroy()

template<typename T , typename Host_Allocator >
void cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::destroy ( T *  p)
inline

Member Data Documentation

◆ dealloc_hint

template<typename T , typename Host_Allocator >
const std::optional<size_t> cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::dealloc_hint

◆ device_id

template<typename T , typename Host_Allocator >
const std::optional<size_t> cppuddle::memory_recycling::detail::recycle_allocator< T, Host_Allocator >::device_id

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