From 48dc98344facad88ccb954ebdd8440b8ca501800 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Fri, 15 Jun 2018 18:27:41 +0000 Subject: ewah/bitmap.c: delete unused 'bitmap_each_bit()' Reported-by: Ramsay Jones Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- ewah/bitmap.c | 24 ------------------------ ewah/ewok.h | 1 - 2 files changed, 25 deletions(-) (limited to 'ewah') diff --git a/ewah/bitmap.c b/ewah/bitmap.c index d61dc6114a8..52f1178db4c 100644 --- a/ewah/bitmap.c +++ b/ewah/bitmap.c @@ -129,30 +129,6 @@ void bitmap_or_ewah(struct bitmap *self, struct ewah_bitmap *other) self->words[i++] |= word; } -void bitmap_each_bit(struct bitmap *self, ewah_callback callback, void *data) -{ - size_t pos = 0, i; - - for (i = 0; i < self->word_alloc; ++i) { - eword_t word = self->words[i]; - uint32_t offset; - - if (word == (eword_t)~0) { - for (offset = 0; offset < BITS_IN_EWORD; ++offset) - callback(pos++, data); - } else { - for (offset = 0; offset < BITS_IN_EWORD; ++offset) { - if ((word >> offset) == 0) - break; - - offset += ewah_bit_ctz64(word >> offset); - callback(pos + offset, data); - } - pos += BITS_IN_EWORD; - } - } -} - size_t bitmap_popcount(struct bitmap *self) { size_t i, count = 0; diff --git a/ewah/ewok.h b/ewah/ewok.h index 87145853336..7c04e6e3565 100644 --- a/ewah/ewok.h +++ b/ewah/ewok.h @@ -217,7 +217,6 @@ void bitmap_and_not(struct bitmap *self, struct bitmap *other); void bitmap_or_ewah(struct bitmap *self, struct ewah_bitmap *other); void bitmap_or(struct bitmap *self, const struct bitmap *other); -void bitmap_each_bit(struct bitmap *self, ewah_callback callback, void *data); size_t bitmap_popcount(struct bitmap *self); #endif -- cgit v1.2.3