Skip to content

[oneDPL] Add more parallel range algorithms #627

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 2 commits 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
15 changes: 15 additions & 0 deletions source/elements/oneDPL/source/parallel_api/parallel_range_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,14 @@ Copying Mutating Operations
std::ranges::borrowed_iterator_t<OutR>>
move (ExecutionPolicy&& pol, R&& r, OutR&& result);

// swap_ranges
template<typename ExecutionPolicy, std::ranges::random_access_range R1, std::ranges::random_access_range R2>
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>>
&& std::ranges::sized_range<R1> && std::ranges::sized_range<R2>
&& std::indirectly_swappable<std::ranges::iterator_t<R1>, std::ranges::iterator_t<R2>>
std::ranges::swap_ranges_result<std::ranges::borrowed_iterator_t<R1>, std::ranges::borrowed_iterator_t<R2>>
swap_ranges (ExecutionPolicy&& pol, R1&& r1, R2&& r2);

// transform (unary)
template <typename ExecutionPolicy, std::ranges::random_access_range R,
std::ranges::random_access_range OutR, std::copy_constructible Fn,
Expand Down Expand Up @@ -503,6 +511,13 @@ In-place Mutating Operations
std::ranges::borrowed_iterator_t<R>
replace_if (ExecutionPolicy&& pol, R&& r, Pred pred, const T& new_value, Proj proj = {});

//reverse
template<typename ExecutionPolicy, std::ranges::random_access_range R>
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>>
&& std::permutable<std::ranges::iterator_t<R>> && std::ranges::sized_range<R>
std::ranges::borrowed_iterator_t<R>
reverse (ExecutionPolicy&& pol, R&& r);

// remove
template <typename ExecutionPolicy, std::ranges::random_access_range R,
typename Proj = std::identity,
Expand Down
Loading