public static long pop_array(Object base, long arrAddr, int wordOffset, int numWords) {
        long popCount = 0;
        for (int i = wordOffset, end = wordOffset + numWords; i < end; ++i) {
            popCount += Long.bitCount(Platform.getLong(base, arrAddr + (i << 3)));
        }
        return popCount;
    }
Returns the number of set bits in an array of longs.
indexr-common/src/main/java/io/indexr/util/BitUtil.java