allocate

allocate#

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

◆ allocate() [1/2]

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

Allocates a memory block of the given size.

Parameters
[in]aThe allocator to use
[in]nThe number of allocated elements
Returns
A pointer to the allocated memory block