Skip to content

Commit 431b55c

Browse files
[oneDPL][ranges] Add nth_element parallel range algorithm (#633)
1 parent caabb9e commit 431b55c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/elements/oneDPL/source/parallel_api/parallel_range_api.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,15 @@ Partition operations
686686
partition_copy (ExecutionPolicy&& pol, R&& r, OutR1&& out_true_r, OutR2&& out_false_r,
687687
Pred pred, Proj proj = {});
688688
689+
// nth_element
690+
template <typename ExecutionPolicy, std::ranges::random_access_range R,
691+
typename Comp = std::ranges::less, typename Proj = std::identity>
692+
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
693+
std::ranges::sized_range<R> && std::sortable<std::ranges::iterator_t<R>, Comp, Proj>
694+
std::ranges::borrowed_iterator_t<R>
695+
nth_element (ExecutionPolicy&& pol, R&& r, std::ranges::iterator_t<R> nth,
696+
Comp comp = {}, Proj proj = {});
697+
689698
}
690699
691700
Copying Mutating Operations

0 commit comments

Comments
 (0)