-
Notifications
You must be signed in to change notification settings - Fork 300
Smoke test for exclusive_scan #6912
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
base: main
Are you sure you want to change the base?
Smoke test for exclusive_scan #6912
Conversation
|
@miscco this is the PR for exclusive_scan algorithm :) |
miscco
left a comment
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.
Thanks a lot for adding this test, I would like to see a test with a custom binary operator. Maybe one that does lhs + rhs + 1 ?
| } | ||
|
|
||
| // exclusive_scan with default initial value (0) | ||
| std::exclusive_scan(std::execution::par, in.begin(), in.end(), out.begin(), 0); |
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 should replace this test by one that provides an init value and a suitable binary operator
| for (std::size_t i = 0; i < N; ++i) | ||
| { | ||
| in[i] = static_cast<int>(i + 1); | ||
| } |
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.
This should just be
| for (std::size_t i = 0; i < N; ++i) | |
| { | |
| in[i] = static_cast<int>(i + 1); | |
| } | |
| std::iota(in.begin(), in.end(), 1); |
Description
See #6486
Checklist