stdgpu: stdgpu::fill_n
stdgpu Latest
Efficient STL-like Data Structures on the GPU
|
|
◆ 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::fill_n |
( |
ExecutionPolicy && |
policy, |
|
|
Iterator |
begin, |
|
|
Size |
n, |
|
|
const T & |
value |
|
) |
| |
Writes the given value into the given range using the copy assignment operator.
- Template Parameters
-
ExecutionPolicy | The type of the execution policy |
Iterator | The type of the iterators |
Size | The size type |
T | The type of the value |
- Parameters
-
[in] | policy | The execution policy, e.g. host or device |
[in] | begin | The iterator pointing to the first element |
[in] | n | The number of elements in the value range |
[in] | value | The value that will be written |
- Returns
- The iterator pointing to the last element
|