HPX

PrevUpHomeNext

Function template move

hpx::parallel::v1::move

Synopsis

// In header: <hpx/parallel/algorithms/move.hpp>


template<typename ExPolicy, typename InIter, typename OutIter> 
  unspecified move(ExPolicy && policy, InIter first, InIter last, 
                   OutIter dest);

Description

Moves the elements in the range [first, last), to another range beginning at dest. After this operation the elements in the moved-from range will still contain valid values of the appropriate type, but not necessarily the same values as before the move.

[Note] Note

Complexity: Performs exactly last - first move assignments.

The move assignments in the parallel move algorithm invoked with an execution policy object of type sequenced_policy execute in sequential order in the calling thread.

The move assignments in the parallel move algorithm invoked with an execution policy object of type parallel_policy or parallel_task_policy are permitted to execute in an unordered fashion in unspecified threads, and indeterminately sequenced within each thread.

Parameters:

dest

Refers to the beginning of the destination range.

first

Refers to the beginning of the sequence of elements the algorithm will be applied to.

last

Refers to the end of the sequence of elements the algorithm will be applied to.

policy

The execution policy to use for the scheduling of the iterations.

Template Parameters:

ExPolicy

The type of the execution policy to use (deduced). It describes the manner in which the execution of the algorithm may be parallelized and the manner in which it executes the move assignments.

InIter

The type of the source iterators used (deduced). This iterator type must meet the requirements of an input iterator.

OutIter

The type of the iterator representing the destination range (deduced). This iterator type must meet the requirements of an output iterator.

Returns:

The move algorithm returns a hpx::future<tagged_pair<tag::in(InIter), tag::out(OutIter)> > if the execution policy is of type sequenced_task_policy or parallel_task_policy and returns tagged_pair<tag::in(InIter), tag::out(OutIter)> otherwise. The move algorithm returns the pair of the input iterator last and the output iterator to the element in the destination range, one past the last element moved.


PrevUpHomeNext