-
Notifications
You must be signed in to change notification settings - Fork 915
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
Use CTAD with Thrust function objects #9768
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-22.02 #9768 +/- ##
================================================
- Coverage 10.49% 10.47% -0.02%
================================================
Files 119 119
Lines 20305 20368 +63
================================================
+ Hits 2130 2133 +3
- Misses 18175 18235 +60
Continue to review full report at Codecov.
|
@@ -315,7 +315,7 @@ std::unique_ptr<cudf::column> gather( | |||
d_out_offsets + output_count, | |||
[] __device__(auto size) { return static_cast<size_t>(size); }, | |||
size_t{0}, | |||
thrust::plus<size_t>{}); | |||
thrust::plus{}); |
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 is surprising to me.
How does it deduce the type without any parameters?
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.
Me too. Does it somehow use the other arguments to xform_reduce?
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.
The return type is dictated by the type of the initial value, aka size_t{0}
on the line above.
@gpucibot merge |
While reviewing another PR, I noticed unnecessary usage of explicit template parameters with Thrust function objects and decided to open a small PR to clean this up (CTAD showed up in C++17).
CI depends on #9766