1 #ifndef HEADER_BITMAP_H
2 #define HEADER_BITMAP_H 1
7 struct bitmap *bitmap_create (size_t bit_cnt);
8 void bitmap_destroy (struct bitmap *);
10 size_t bitmap_size (const struct bitmap *);
12 void bitmap_set (struct bitmap *, size_t idx, bool);
13 void bitmap_set_all (struct bitmap *, bool);
15 void bitmap_mark (struct bitmap *, size_t idx);
16 void bitmap_reset (struct bitmap *, size_t idx);
17 void bitmap_flip (struct bitmap *, size_t idx);
19 bool bitmap_test (const struct bitmap *, size_t idx);
21 #define BITMAP_ERROR ((size_t) -1)
22 size_t bitmap_scan (const struct bitmap *, bool);
23 size_t bitmap_find_and_set (struct bitmap *);
24 size_t bitmap_find_and_clear (struct bitmap *);
26 size_t bitmap_set_cnt (const struct bitmap *);
27 bool bitmap_clear_cnt (const struct bitmap *);
29 bool bitmap_any (const struct bitmap *);
30 bool bitmap_none (const struct bitmap *);
31 bool bitmap_all (const struct bitmap *);