summaryrefslogtreecommitdiff
path: root/ewah/bitmap.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-06-15 18:27:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-18 17:16:19 (GMT)
commit48dc98344facad88ccb954ebdd8440b8ca501800 (patch)
tree5156914a891c30d81d54ec51aa92a9e4a55c6025 /ewah/bitmap.c
parentb36c3134bb1a292aa63b219ad97d3be93caa7015 (diff)
downloadgit-48dc98344facad88ccb954ebdd8440b8ca501800.zip
git-48dc98344facad88ccb954ebdd8440b8ca501800.tar.gz
git-48dc98344facad88ccb954ebdd8440b8ca501800.tar.bz2
ewah/bitmap.c: delete unused 'bitmap_each_bit()'
Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ewah/bitmap.c')
-rw-r--r--ewah/bitmap.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/ewah/bitmap.c b/ewah/bitmap.c
index d61dc61..52f1178 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;