-
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 cuda::std::is_arithmetic
in cudf::is_numeric
trait.
#9996
Use cuda::std::is_arithmetic
in cudf::is_numeric
trait.
#9996
Conversation
I think we should just use |
That's possible. @jrhemstad mentioned in conversation with me that it is nice that the "numeric" name aligns with |
That's fine. At the very least we could remove the
|
I'm not sure if that's possible here -- lots of code appears to use the template form of this trait as well as the form accepting a
|
Codecov Report
@@ Coverage Diff @@
## branch-22.02 #9996 +/- ##
================================================
+ Coverage 10.41% 10.45% +0.03%
================================================
Files 119 119
Lines 20023 20417 +394
================================================
+ Hits 2086 2134 +48
- Misses 17937 18283 +346
Continue to review full report at Codecov.
|
@gpucibot merge |
The current implementation of
cudf::is_numeric
is equivalent to the implementation ofcuda::std::is_arithmetic
. This PR simplifies the implementation in cuDF and aligns it with libcudacxx.Notes:
bool
returns true from both(cuda::)std::is_integral
and(cuda::)std::is_arithmetic
, sobool
is considered a "numeric" type. This behavior is unchanged.cuda::std::is_arithmetic
rather thanstd::is_arithmetic
to support 128-bit integer types (as we do withcuda::std::is_integral
in the current implementation)See also: https://en.cppreference.com/w/cpp/types/is_arithmetic