avertleyb commented on code in PR #13376:
URL: https://github.com/apache/arrow/pull/13376#discussion_r896831470


##########
cpp/src/arrow/util/bit_util.h:
##########
@@ -67,7 +67,14 @@ static constexpr uint8_t kBytePopcount[] = {
     5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 
4, 5, 5, 6,
     4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8};
 
-static inline uint64_t PopCount(uint64_t bitmap) { return 
ARROW_POPCOUNT64(bitmap); }
+static inline uint64_t PopCount(uint64_t bitmap) {
+#if defined(_MSC_VER) && !defined(_M_AMD64) && !defined(_M_X64) 
+  const uint32_t* p = reinterpret_cast<const uint32_t*>((void*)(&bitmap));
+  return ARROW_POPCOUNT32(*p) + ARROW_POPCOUNT32(*(p + 1));

Review Comment:
   @kou updated PR



-- 
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-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to