[ovs-dev] [PATCH v2 2/9] lib/util: Add ctz64() and popcount64().
Jarno Rajahalme
jrajahalme at nicira.com
Sat Nov 16 00:03:32 UTC 2013
> On Nov 15, 2013, at 3:48 PM, Ben Pfaff <blp at nicira.com> wrote:
>
>> On Wed, Nov 13, 2013 at 01:32:42PM -0800, Jarno Rajahalme wrote:
>> Add raw_ctz64(), ctz64(), and popcount64() using builtins when
>> available.
>>
>> I'm not sure if the "UINT64_MAX == ~0UL" and "UINT64_MAX == ~0ULL"
>> work in all cases as I imagine they would.
>
> I think you could use ULONG_MAX and ULLONG_MAX, any reason not to?
>
It doesn't matter if they are the same in some cases, right?
>> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
>
> Acked-by: Ben Pfaff <blp at nicira.com>
>
> By the way, I've been thinking about breaking the bitwise stuff out
> into a new bitwise.h header. What do you think of that?
I think it's a good idea :-)
Jarno
More information about the dev
mailing list