Skip to content

Commit 48dc983

Browse files
derrickstoleegitster
authored andcommitted
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>
1 parent b36c313 commit 48dc983

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

ewah/bitmap.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -129,30 +129,6 @@ void bitmap_or_ewah(struct bitmap *self, struct ewah_bitmap *other)
129129
self->words[i++] |= word;
130130
}
131131

132-
void bitmap_each_bit(struct bitmap *self, ewah_callback callback, void *data)
133-
{
134-
size_t pos = 0, i;
135-
136-
for (i = 0; i < self->word_alloc; ++i) {
137-
eword_t word = self->words[i];
138-
uint32_t offset;
139-
140-
if (word == (eword_t)~0) {
141-
for (offset = 0; offset < BITS_IN_EWORD; ++offset)
142-
callback(pos++, data);
143-
} else {
144-
for (offset = 0; offset < BITS_IN_EWORD; ++offset) {
145-
if ((word >> offset) == 0)
146-
break;
147-
148-
offset += ewah_bit_ctz64(word >> offset);
149-
callback(pos + offset, data);
150-
}
151-
pos += BITS_IN_EWORD;
152-
}
153-
}
154-
}
155-
156132
size_t bitmap_popcount(struct bitmap *self)
157133
{
158134
size_t i, count = 0;

ewah/ewok.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ void bitmap_and_not(struct bitmap *self, struct bitmap *other);
217217
void bitmap_or_ewah(struct bitmap *self, struct ewah_bitmap *other);
218218
void bitmap_or(struct bitmap *self, const struct bitmap *other);
219219

220-
void bitmap_each_bit(struct bitmap *self, ewah_callback callback, void *data);
221220
size_t bitmap_popcount(struct bitmap *self);
222221

223222
#endif

0 commit comments

Comments
 (0)