| 261 | } |
| 262 | |
| 263 | int bitmap_equals_ewah(struct bitmap *self, struct ewah_bitmap *other) |
| 264 | { |
| 265 | struct ewah_iterator it; |
| 266 | eword_t word; |
| 267 | size_t i = 0; |
| 268 | |
| 269 | ewah_iterator_init(&it, other); |
| 270 | |
| 271 | while (ewah_iterator_next(&word, &it)) |
| 272 | if (word != (i < self->word_alloc ? self->words[i++] : 0)) |
| 273 | return 0; |
| 274 | |
| 275 | for (; i < self->word_alloc; i++) |
| 276 | if (self->words[i]) |
| 277 | return 0; |
| 278 | |
| 279 | return 1; |
| 280 | } |
| 281 | |
| 282 | int bitmap_is_subset(struct bitmap *self, struct bitmap *other) |
| 283 | { |
no test coverage detected