Lines Matching refs:binfo
12 bitmap_info_init(bitmap_info_t *binfo, size_t nbits) { in bitmap_info_init() argument
24 binfo->levels[0].group_offset = 0; in bitmap_info_init()
28 binfo->levels[i].group_offset = binfo->levels[i-1].group_offset in bitmap_info_init()
32 binfo->levels[i].group_offset = binfo->levels[i-1].group_offset in bitmap_info_init()
34 assert(binfo->levels[i].group_offset <= BITMAP_GROUPS_MAX); in bitmap_info_init()
35 binfo->nlevels = i; in bitmap_info_init()
36 binfo->nbits = nbits; in bitmap_info_init()
40 bitmap_info_ngroups(const bitmap_info_t *binfo) { in bitmap_info_ngroups() argument
41 return binfo->levels[binfo->nlevels].group_offset; in bitmap_info_ngroups()
45 bitmap_init(bitmap_t *bitmap, const bitmap_info_t *binfo, bool fill) { in bitmap_init() argument
56 memset(bitmap, 0, bitmap_size(binfo)); in bitmap_init()
66 memset(bitmap, 0xffU, bitmap_size(binfo)); in bitmap_init()
67 extra = (BITMAP_GROUP_NBITS - (binfo->nbits & BITMAP_GROUP_NBITS_MASK)) in bitmap_init()
70 bitmap[binfo->levels[1].group_offset - 1] >>= extra; in bitmap_init()
72 for (i = 1; i < binfo->nlevels; i++) { in bitmap_init()
73 size_t group_count = binfo->levels[i].group_offset - in bitmap_init()
74 binfo->levels[i-1].group_offset; in bitmap_init()
78 bitmap[binfo->levels[i+1].group_offset - 1] >>= extra; in bitmap_init()
86 bitmap_info_init(bitmap_info_t *binfo, size_t nbits) { in bitmap_info_init() argument
90 binfo->ngroups = BITMAP_BITS2GROUPS(nbits); in bitmap_info_init()
91 binfo->nbits = nbits; in bitmap_info_init()
95 bitmap_info_ngroups(const bitmap_info_t *binfo) { in bitmap_info_ngroups() argument
96 return binfo->ngroups; in bitmap_info_ngroups()
100 bitmap_init(bitmap_t *bitmap, const bitmap_info_t *binfo, bool fill) { in bitmap_init() argument
104 memset(bitmap, 0, bitmap_size(binfo)); in bitmap_init()
108 memset(bitmap, 0xffU, bitmap_size(binfo)); in bitmap_init()
109 extra = (BITMAP_GROUP_NBITS - (binfo->nbits & BITMAP_GROUP_NBITS_MASK)) in bitmap_init()
112 bitmap[binfo->ngroups - 1] >>= extra; in bitmap_init()
119 bitmap_size(const bitmap_info_t *binfo) { in bitmap_size() argument
120 return (bitmap_info_ngroups(binfo) << LG_SIZEOF_BITMAP); in bitmap_size()