[igt-dev] [PATCH i-g-t v3] lib/igt_collection: Adding combinatorics facility

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Jan 21 10:03:57 UTC 2020


On Tue, Jan 21, 2020 at 11:44:48AM +0200, Petri Latvala wrote:

<cut>

I'll check formatting and send in v4.
 
> > + */
> > +
> > +#if defined(__GNUC__)
> > +#define NUM_BITS(v) __builtin_popcount(v)
> > +#else
> > +/* Taken from Hacker's Delight, for non-gcc compiler */
> 
> Hmm, what's the license for these bits?
>

I've no idea. It is just O(1) pattern known for years collected
in the book mentioned above. I guess I could put it here without
any annotation.

--
Zbigniew. 


More information about the igt-dev mailing list