copy_n

copy_n#

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

◆ copy_n()

template<typename ExecutionPolicy , typename InputIt , typename Size , typename OutputIt , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >
OutputIt stdgpu::copy_n ( ExecutionPolicy &&  policy,
InputIt  begin,
Size  n,
OutputIt  output_begin 
)

Copies all elements of the input range to the output range using the copy assignment operator.

Template Parameters
ExecutionPolicyThe type of the execution policy
InputItThe type of the input iterators
SizeThe size type
OutputItThe type of the output iterator
Parameters
[in]policyThe execution policy, e.g. host or device
[in]beginThe input iterator pointing to the first element
[in]nThe number of elements in the value range
[in]output_beginThe output iterator pointing to the first element
Returns
The output iterator pointing to the last element