edponce commented on a change in pull request #11882:
URL: https://github.com/apache/arrow/pull/11882#discussion_r776673334
##########
File path: cpp/src/arrow/util/bit_block_counter.h
##########
@@ -87,6 +87,147 @@ struct BitBlockOrNot<bool> {
static bool Call(bool left, bool right) { return left || !right; }
};
+// Three Arguments
+template <typename T>
+struct BitBlockAndAnd {
+ static T Call(T left, T mid, T right) { return left & mid & right; }
+};
+
+template <>
+struct BitBlockAndAnd<bool> {
+ static bool Call(bool left, bool mid, bool right) { return left && mid &&
right; }
Review comment:
Note, the only bool specialization needed would be for negating bool
variables. I submitted [this PR with these
changes](https://github.com/apache/arrow/pull/12052) that if they get accepted
you can make use of the added`BitNot()` to wrap negations.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]