![]() |
hpx::parallel::v1::copy_n
// In header: <hpx/parallel/detail/copy.hpp> template<typename ExPolicy, typename InIter, typename Size, typename OutIter> unspecified copy_n(ExPolicy && policy, InIter first, Size count, OutIter dest);
Copies the elements in the range [first, first + count), starting from first and proceeding to first + count - 1., to another range beginning at dest.
![]() |
Note |
---|---|
Complexity: Performs exactly count assignments, if count > 0, no assignments otherwise. |
The assignments in the parallel copy_n algorithm invoked with an execution policy object of type sequential_execution_policy
execute in sequential order in the calling thread.
The assignments in the parallel copy_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 copy_n algorithm returns a hpx::future<OutIter> if the execution policy is of type task_execution_policy and returns OutIter otherwise. The copy_n algorithm returns the output iterator to the element in the destination range, one past the last element copied. |