uninitialized_fill_n

uninitialized_fill_n#

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

◆ uninitialized_fill_n()

template<typename ExecutionPolicy , typename Iterator , typename Size , typename T , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
Iterator stdgpu::uninitialized_fill_n ( ExecutionPolicy &&  policy,
Iterator  begin,
Size  n,
const T &  value 
)

Writes the given value to into the given range using the copy constructor.

Template Parameters
ExecutionPolicyThe type of the execution policy
IteratorThe type of the iterators
SizeThe size type
TThe type of the value
Parameters
[in]policyThe execution policy, e.g. host or device
[in]beginThe iterator pointing to the first element
[in]nThe number of elements in the value range
[in]valueThe value that will be written
Returns
The iterator pointing to the last element