![]() |
hpx::parallel::v1::fill_n
// In header: <hpx/parallel/detail/fill.hpp> template<typename ExPolicy, typename OutIter, typename Size, typename T> unspecified fill_n(ExPolicy && policy, OutIter first, Size count, T value);
Assigns the given value value to the first count elements in the range beginning at first if count > 0. Does nothing otherwise.
![]() |
Note |
---|---|
Complexity: Performs exactly count assignments, for count > 0. |
The comparisons in the parallel fill_n algorithm invoked with an execution policy object of type sequential_execution_policy
execute in sequential order in the calling thread.
The comparisons in the parallel fill_n algorithm invoked with an execution policy object of type parallel_execution_policy
or task_execution_policy
are permitted to execute in an unordered fashion in unspecified threads, and indeterminately sequenced within each thread.
Parameters: |
|
||||||||
Template Parameters: |
|
||||||||
Returns: |
The fill_n algorithm returns a hpx::future<void> if the execution policy is of type task_execution_policy and returns difference_type otherwise (where difference_type is defined by void. |