Skip to content
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

Remove unnecessary std::is_partitioned check in dpct::partition_point #2034

Conversation

mmichel11
Copy link
Contributor

With regards to preconditions of the input for std::partition_point, cppref states, "If the elements elem of [first, last) are not partitioned with respect to the expression bool(p(elem)), the behavior is undefined."

We currently check std::is_partitioned on the input buffer in dpct::partition_point which is unnecessary from both the C++ standard and for migration purposes. This check launches an additional kernel that performs a full pass over the buffer and hurts performance.

This PR removes this unnecessary check.

@mmichel11 mmichel11 requested a review from a team as a code owner June 4, 2024 20:41
@zhimingwang36 zhimingwang36 merged commit 967f68a into oneapi-src:SYCLomatic Jun 17, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants