-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-12685: [C++][Compute] Add unary absolute value kernel #10274
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
ARROW-12685: [C++][Compute] Add unary absolute value kernel #10274
Conversation
|
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW Opening JIRAs ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename pull request title in the following format? or See also: |
|
I named the compute function as |
|
@cyb70289 I noticed that clang removes the check of |
|
Thanks @edponce for deep investigation. From std::abs() document, it is UB if input is
For checked abs, you can check |
|
For such a simple kernel we found:
becomes
|
03f6f1e to
f8d6956
Compare
|
Also, would you rebase to fix some CI failures? #10310 |
780c6a0 to
4294ba5
Compare
cyb70289
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.
LGTM, +1
|
@pitrou, do you have other comments to this PR? |
This PR adds the arithmetic absolute value kernels to the compute layer.