allocate

allocate#

stdgpu: stdgpu::allocator_traits::allocate
stdgpu Latest
Efficient STL-like Data Structures on the GPU

◆ allocate() [2/2]

template<typename Allocator >
static pointer stdgpu::allocator_traits< Allocator >::allocate ( Allocator &  a,
index_type  n,
const_void_pointer  hint 
)
static

Allocates a memory block of the given size.

Parameters
[in]aThe allocator to use
[in]nThe number of allocated elements
[in]hintA pointer serving as a hint for the allocator
Returns
A pointer to the allocated memory block