Skip to content

Commit ff2ec78

Browse files
[oneDPL] Add nth_element parallel range algorithm
1 parent 1ea5088 commit ff2ec78

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,14 @@ Sorting and Merge
387387
merge (ExecutionPolicy&& pol, R1&& r1, R2&& r2, OutR&& result, Comp comp = {},
388388
Proj1 proj1 = {}, Proj2 proj2 = {});
389389
390+
// nth_element
391+
template <typename ExecutionPolicy, std::ranges::random_access_range R,
392+
typename Comp = std::ranges::less, typename Proj = std::identity>
393+
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
394+
std::ranges::sized_range<R> && std::sortable<std::ranges::iterator_t<R>, Comp, Proj>
395+
std::ranges::borrowed_iterator_t<R>
396+
nth_element (ExecutionPolicy&& pol, R&& r, std::ranges::iterator_t<R> nth,
397+
Comp comp = {}, Proj proj = {});
390398
}
391399
392400
Copying Mutating Operations

0 commit comments

Comments
 (0)