lkml.org 
[lkml]   [2007]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Add "is_power_of_2" checking to log2.h.
From
Date
On Thu, 01 Feb 2007 13:39:15 +0100, Tim Schmielau said:
> #define is_power_of_4(x) (is_power_of_2_or_zero(x) \
> && (x & ((typeof(x))0x55555555)))

Those 5's are going to need more magic if x is a 64-bit typeof?

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2007-02-01 21:21    [W:0.042 / U:1.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site