You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/30 17:34:16 UTC
[GitHub] [arrow] pitrou commented on a change in pull request #12052: ARROW-15220: [C++] Remove bool specializations of bit block counter operations
pitrou commented on a change in pull request #12052:
URL: https://github.com/apache/arrow/pull/12052#discussion_r776814531
##########
File path: cpp/src/arrow/util/bit_block_counter.h
##########
@@ -48,43 +48,33 @@ inline uint64_t ShiftWord(uint64_t current, uint64_t next, int64_t shift) {
// These templates are here to help with unit tests
template <typename T>
-struct BitBlockAnd {
- static T Call(T left, T right) { return left & right; }
-};
+inline T BitNot(T x) {
+ return ~x;
+}
template <>
-struct BitBlockAnd<bool> {
- static bool Call(bool left, bool right) { return left && right; }
-};
+inline bool BitNot(bool x) {
+ return !x;
+}
template <typename T>
-struct BitBlockAndNot {
- static T Call(T left, T right) { return left & ~right; }
+struct BitBlockAnd {
Review comment:
Since we're using a plain function for `BitNot`, can we do the same for this one too (and the other functors)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org