mir/mir-bitmap.h
static inline size_t bitmap_bit_count (const_bitmap_t bm) {
  size_t i, len = VARR_LENGTH (bitmap_el_t, bm);
  bitmap_el_t el, *addr = VARR_ADDR (bitmap_el_t, bm);
  size_t count = 0;

  for (i = 0; i < len; i++) {
    if ((el = addr[i]) != 0) {
      for (; el != 0; el >>= 1)
        if (el & 1) count++;
    }
  }
  return count;
}
/* Return the number of bits set in BM.  */
Return the number of bits set in BM.
Return the number of bits set in BM .
static inline size_t bitmap_bit_count (const_bitmap_t bm) {
  size_t i, len = VARR_LENGTH (bitmap_el_t, bm);
  bitmap_el_t el, *addr = VARR_ADDR (bitmap_el_t, bm);
  size_t count = 0;
  for (i = 0; i < len; i++) {
    if ((el = addr[i]) != 0) {
      for (; el != 0; el >>= 1)
        if (el & 1) count++;
    }
  }
  return count;
}
static inline size_t bitmap_bit_count ( const_bitmap_t bm ) { size_t i , len = VARR_LENGTH ( bitmap_el_t , bm ) ; bitmap_el_t el , * addr = VARR_ADDR ( bitmap_el_t , bm ) ; size_t count = 0 ; for ( i = 0 ; i < len ; i ++ ) { if ( ( el = addr [ i ] ) != 0 ) { for ( ; el != 0 ; el >>= 1 ) if ( el & 1 ) count ++ ; } } return count ; }
Return the number of bits set in BM.
Return the number of bits set in BM .