On Tue, Jul 01, 2014 at 09:57:13AM -0700, Junio C Hamano wrote:
> Another thing I noticed was that the definition of and the
> commentary on bitset_equal() and bitset_empty() sounded somewhat
> "undecided". These functions take "max" that is deliberately named
> differently from "num_bits" (the w
Jeff King writes:
> On Sun, Jun 29, 2014 at 03:41:37AM -0400, Eric Sunshine wrote:
>
>> > +static inline void bitset_set(unsigned char *bits, int n)
>> > +{
>> > + bits[n / CHAR_BIT] |= 1 << (n % CHAR_BIT);
>> > +}
>>
>> Is it intentional or an oversight that there is no way to clear a bit
On Sun, Jun 29, 2014 at 03:41:37AM -0400, Eric Sunshine wrote:
> > +static inline void bitset_set(unsigned char *bits, int n)
> > +{
> > + bits[n / CHAR_BIT] |= 1 << (n % CHAR_BIT);
> > +}
>
> Is it intentional or an oversight that there is no way to clear a bit
> in the set?
Intentional i
On Wed, Jun 25, 2014 at 7:40 PM, Jeff King wrote:
> We already have a nice-to-use bitmap implementation in
> ewah/bitmap.c. It pretends to be infinitely long when asking
> for a bit (and just returns 0 for bits that haven't been
> allocated or set), and dynamically resizes as appropriate
> when yo
On Thu, Jun 26, 2014 at 05:15:05AM +0200, Torsten Bögershausen wrote:
> > + */
> > +static inline int bitset_sizeof(int num_bits)
> > +{
> > + return (num_bits + CHAR_BIT - 1) / CHAR_BIT;
> > +}
> Just a general question about the usage of "int" here (and at other places):
> Is there a special r
On 2014-06-26 01.40, Jeff King wrote:
[]
> + */
> +static inline int bitset_sizeof(int num_bits)
> +{
> + return (num_bits + CHAR_BIT - 1) / CHAR_BIT;
> +}
Just a general question about the usage of "int" here (and at other places):
Is there a special reason for new code to allow num_bits to b
We already have a nice-to-use bitmap implementation in
ewah/bitmap.c. It pretends to be infinitely long when asking
for a bit (and just returns 0 for bits that haven't been
allocated or set), and dynamically resizes as appropriate
when you set bits.
The cost to this is that each bitmap must store
7 matches
Mail list logo