hpx/parallel/container_algorithms/move.hpp#

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx

Top-level namespace.

namespace ranges

Functions

template<typename ExPolicy, typename Iter1, typename Sent1, typename Iter2>
hpx::parallel::util::detail::algorithm_result<ExPolicy, move_result<Iter1, Iter2>>::type move(ExPolicy &&policy, Iter1 first, Sent1 last, Iter2 dest)#

Moves the elements in the range rng 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.

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

The assignments in the parallel copy 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.

Note

Complexity: Performs exactly std::distance(begin(rng), end(rng)) assignments.

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 assignments.

  • Iter1 – The type of the source iterators used for the first range (deduced). This iterator type must meet the requirements of an forward iterator.

  • Sent1 – The type of the source iterators used for the end of the first range (deduced).

  • Iter2 – The type of the source iterators used for the second range (deduced). This iterator type must meet the requirements of an forward iterator.

Parameters
  • policy – The execution policy to use for the scheduling of the iterations.

  • 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.

  • dest – Refers to the beginning of the destination range.

Returns

The move algorithm returns a hpx::future<ranges::move_result<iterator_t<Rng>, FwdIter2>> if the execution policy is of type sequenced_task_policy or parallel_task_policy and returns ranges::move_result<iterator_t<Rng>, FwdIter2> 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.

template<typename ExPolicy, typename Rng, typename Iter2>
hpx::parallel::util::detail::algorithm_result<ExPolicy, move_result<typename hpx::traits::range_iterator<Rng>::type, Iter2>>::type move(ExPolicy &&policy, Rng &&rng, Iter2 dest)#

Moves the elements in the range rng 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.

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

The assignments in the parallel copy 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.

Note

Complexity: Performs exactly std::distance(begin(rng), end(rng)) assignments.

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 assignments.

  • Rng – The type of the source range used (deduced). The iterators extracted from this range type must meet the requirements of an input iterator.

  • Iter2 – The type of the source iterators used for the second range (deduced). This iterator type must meet the requirements of an forward iterator.

Parameters
  • policy – The execution policy to use for the scheduling of the iterations.

  • rng – Refers to the sequence of elements the algorithm will be applied to.

  • dest – Refers to the beginning of the destination range.

Returns

The move algorithm returns a hpx::future<ranges::move_result<iterator_t<Rng>, FwdIter2>> if the execution policy is of type sequenced_task_policy or parallel_task_policy and returns ranges::move_result<iterator_t<Rng>, FwdIter2> 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.

template<typename Iter1, typename Sent1, typename Iter2>
move_result<Iter1, Iter2> move(Iter1 first, Sent1 last, Iter2 dest)#

Moves the elements in the range rng 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

Complexity: Performs exactly std::distance(begin(rng), end(rng)) assignments.

Template Parameters
  • Iter1 – The type of the source iterators used for the first range (deduced). This iterator type must meet the requirements of an forward iterator.

  • Sent1 – The type of the source iterators used for the end of the first range (deduced).

  • Iter2 – The type of the source iterators used for the second range (deduced). This iterator type must meet the requirements of an forward iterator.

Parameters
  • 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.

  • dest – Refers to the beginning of the destination range.

Returns

The move algorithm returns ranges::move_result<iterator_t<Rng>, FwdIter2>. 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.

template<typename Rng, typename Iter2>
move_result<typename hpx::traits::range_iterator<Rng>::type, Iter2> move(Rng &&rng, Iter2 dest)#

Moves the elements in the range rng 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

Complexity: Performs exactly std::distance(begin(rng), end(rng)) assignments.

Template Parameters
  • Rng – The type of the source range used (deduced). The iterators extracted from this range type must meet the requirements of an input iterator.

  • Iter2 – The type of the source iterators used for the second range (deduced). This iterator type must meet the requirements of an forward iterator.

Parameters
  • rng – Refers to the sequence of elements the algorithm will be applied to.

  • dest – Refers to the beginning of the destination range.

Returns

The move algorithm returns a ranges::move_result<iterator_t<Rng>, FwdIter2>. 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.