iota

iota#

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

◆ iota()

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

Writes ascending values {values + i} to the i-th position of the given range.

Template Parameters
ExecutionPolicyThe type of the execution policy
IteratorThe type of the iterators
TThe type of the values
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 starting value that will be incremented