fill

fill#

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

◆ fill()

template<typename ExecutionPolicy , typename Iterator , typename T , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
void stdgpu::fill ( ExecutionPolicy &&  policy,
Iterator  begin,
Iterator  end,
const T &  value 
)

Writes the given value into the given range using the copy assignment operator.

Template Parameters
ExecutionPolicyThe type of the execution policy
IteratorThe type of the iterators
TThe type of the value
Parameters
[in]policyThe execution policy, e.g. host or device
[in]beginThe iterator pointing to the first element
[in]endThe iterator pointing past to the last element
[in]valueThe value that will be written