stdgpu: stdgpu::allocator_traits< Allocator > — stdgpu Latest documentation (original) (raw)

allocator_traits< Allocator >#

stdgpu: stdgpu::allocator_traits< Allocator >

stdgpu Latest

Efficient STL-like Data Structures on the GPU

template
struct stdgpu::allocator_traits< Allocator >

A general allocator traitor.

Differences to std::allocator_traits:

Public Types
using allocator_type = Allocator
using const_pointer = typename std::pointer_traits< pointer >::template rebind< const value_type >
using const_void_pointer = typename std::pointer_traits< pointer >::template rebind< const void >
using difference_type = typename std::pointer_traits< pointer >::difference_type
using index_type = index64_t
using is_always_equal = std::is_empty< Allocator >
using pointer = value_type *
using propagate_on_container_copy_assignment = std::false_type
using propagate_on_container_move_assignment = std::false_type
using propagate_on_container_swap = std::false_type
template
using rebind_alloc = typename std::allocator_traits< Allocator >::template rebind_alloc< T >
template
using rebind_traits = allocator_traits< rebind_alloc< T > >
using value_type = typename Allocator::value_type
using void_pointer = typename std::pointer_traits< pointer >::template rebind< void >
Static Public Member Functions
static pointer allocate (Allocator &a, index_type n)
static pointer allocate (Allocator &a, index_type n, const_void_pointer hint)
template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
static pointer allocate_filled (ExecutionPolicy &&policy, Allocator &a, index_type n, const value_type &default_value)
template<typename T , class... Args>
static STDGPU_HOST_DEVICE void construct (Allocator &a, T *p, Args &&... args)
static void deallocate (Allocator &a, pointer p, index_type n)
template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
static void deallocate_filled (ExecutionPolicy &&policy, Allocator &a, pointer p, index_type n)
template
static STDGPU_HOST_DEVICE void destroy (Allocator &a, T *p)
static STDGPU_HOST_DEVICE index_type max_size (const Allocator &a) noexcept
static Allocator select_on_container_copy_construction (const Allocator &a)