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

ARROW-13824: [C++][Compute] Make constexpr BooleanToNumber kernel #11050

Conversation

edponce
Copy link
Contributor

@edponce edponce commented Sep 1, 2021

This PR makes constexpr the Call method of BooleanToNumber kernel.

@github-actions
Copy link

github-actions bot commented Sep 1, 2021

@edponce
Copy link
Contributor Author

edponce commented Sep 1, 2021

The CI error (Integration/AMD64) seems unrelated to this PR.

Comment on lines -268 to -270
constexpr auto kOne = static_cast<OutValue>(1);
constexpr auto kZero = static_cast<OutValue>(0);
return val ? kOne : kZero;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks this original code is easier to read?

Copy link
Contributor Author

@edponce edponce Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is fine. This was kind of an opinionated issue, so it is ok to ignore/close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants