-
Notifications
You must be signed in to change notification settings - Fork 114
[oneDPL] Add more parallel range algorithms #614
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
[oneDPL] Add more parallel range algorithms #614
Conversation
bc0b61a
to
c286144
Compare
source/elements/oneDPL/source/parallel_api/parallel_range_api.rst
Outdated
Show resolved
Hide resolved
35db54e
to
005583b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
I confirmed that these signatures match p3179r7, other than the noted differences involving usage in const expressions, and sizing of both ranges for mismatch
.
The most recent change removes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
std::ranges::random_access_range R2, typename Pred = std::ranges::equal_to, | ||
typename Proj1 = std::identity, typename Proj2 = std::identity> | ||
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> && | ||
(std::ranges::sized_range<R1> || std::ranges::sized_range<R2>) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to keep it like that? Or are we going to make a change to &&
? I think we had this conversation but I don't remember what we ended up with...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will keep it like that, it's described in the differences - see https://github.com/uxlfoundation/oneAPI-spec/pull/610/files
|
||
|
||
// find_end | ||
template<typename ExecutionPolicy, std::ranges::random_access_range R1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I think we need to introduce execution-policy exposition-only concept at some point (not in this PR) to just simplify the specification. We can do it at any point because I don't consider it a breaking change anyhow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reapproving after removal of generate
As a follow-up to the oneDPL RFC proposal uxlfoundation/oneDPL#2037, this PR adds new parallel range algorithm signatures to the specification:
fill
,,generate
move
,replace
,replace_if
,remove
,remove_if
,mismatch
,minmax_element
,minmax
,min
,max
,find_first_of
,find_end
,is_sorted_until
.