Skip to content

[oneDPL] Add nth_element parallel range algorithm #633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,14 @@ Sorting and Merge
merge (ExecutionPolicy&& pol, R1&& r1, R2&& r2, OutR&& result, Comp comp = {},
Proj1 proj1 = {}, Proj2 proj2 = {});

// nth_element
template <typename ExecutionPolicy, std::ranges::random_access_range R,
typename Comp = std::ranges::less, typename Proj = std::identity>
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
std::ranges::sized_range<R> && std::sortable<std::ranges::iterator_t<R>, Comp, Proj>
std::ranges::borrowed_iterator_t<R>
nth_element (ExecutionPolicy&& pol, R&& r, std::ranges::iterator_t<R> nth,
Comp comp = {}, Proj proj = {});
}

Copying Mutating Operations
Expand Down
Loading