Re: [PATCH 2/8] ewah/bitmap.c: delete unused 'bitmap_each_bit()'
- From
Ramsay Jones <ramsay@ramsayjones.plus.com>
- Date
- Jun 15, 2018, 15:03 UTC
- Message-ID
- <aa2e0c9e-752c-e8ec-ce1f-ccbc6af6ce27@ramsayjones.plus.com>
- In-Reply-To
- <20180615143018.170686-3-dstolee@microsoft.com>
On 15/06/18 15:30, Derrick Stolee wrote:
Show 42 quoted lines
> Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
> ewah/bitmap.c | 24 ------------------------
> 1 file changed, 24 deletions(-)
>
> diff --git a/ewah/bitmap.c b/ewah/bitmap.c
> index d61dc6114a..52f1178db4 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;
> Again, remove extern declaration from header file.
ATB, Ramsay Jones