allocate_filled

allocate_filled#

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

◆ allocate_filled()

template<typename Allocator >
template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
static pointer stdgpu::allocator_traits< Allocator >::allocate_filled ( ExecutionPolicy &&  policy,
Allocator &  a,
index_type  n,
const value_type default_value 
)
static

Allocates and fills a memory block of the given size.

Template Parameters
ExecutionPolicyThe type of the execution policy
Parameters
[in]policyThe execution policy, e.g. host or device, corresponding to the allocator
[in]aThe allocator to use
[in]nThe number of allocated elements
[in]default_valueA default value, that should be stored in every entry
Returns
A pointer to the allocated memory block