Robert P. J. Day wrote:
>
> seriously, though, there is the potential of breaking something with
> this change since you can see how there is some inconsistency in how
> it's done *now* just for powerpc which, in some places, defines its
> own versions of this:
>
> ./arch/ppc/mm/pgtable.c:
>
Hello,
> > Please fix the parentheses thing in both arch/powerpc/mm/
> > pgtable_32.c and
> > arch/ppc/mm/pgtable.c.
> >
> >> +#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1))
>
> These should be fixed and pushed upstream by now.
Great. Thanks.
Regards,
Mariusz Kozlowski
-
On Feb 20, 2007, at 9:29 AM, Mariusz Kozlowski wrote:
Hello,
Please fix the parentheses thing in both arch/powerpc/mm/
pgtable_32.c and
arch/ppc/mm/pgtable.c.
+#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1))
These should be fixed and pushed upstream by now.
- k
-
To uns
Hello,
Please fix the parentheses thing in both arch/powerpc/mm/pgtable_32.c and
arch/ppc/mm/pgtable.c.
> +#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1))
Regards,
Mariusz Kozlowski
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of
On Thu, 1 Feb 2007, [EMAIL PROTECTED] wrote:
> 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))0x)))
>
> Those 5's are going to need more magic if x is a 64-bit typeof?
Yeah
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))0x)))
Those 5's are going to need more magic if x is a 64-bit typeof?
pgprxmSCgl3W9.pgp
Description: PGP signature
On Thu, 1 Feb 2007, David Howells wrote:
> Robert P. J. Day <[EMAIL PROTECTED]> wrote:
>
> > +#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1))
>
> If this is such a commonly implemented op, it should probably be implemented
> globally too.
>
> I also wonder if there's some better way
On Thu, 1 Feb 2007, David Howells wrote:
>
> Robert P. J. Day <[EMAIL PROTECTED]> wrote:
>
> > +#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1))
>
> If this is such a commonly implemented op, it should probably be implemented
> globally too.
there are only two checks of the form "is_p
Robert P. J. Day <[EMAIL PROTECTED]> wrote:
> +#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1))
If this is such a commonly implemented op, it should probably be implemented
globally too.
I also wonder if there's some better way of implementing it than this, but I
can't think of on
Nick Piggin <[EMAIL PROTECTED]> wrote:
> > + * Determine whether some value is a power of two, where zero is
> > + * *not* considered a power of two.
> > + */
>
> Why the qualifier? Zero *is* not a power of 2, is it?
The qualifier is worth leaving in the comment, just so that people who want to
On Wed, 31 Jan 2007, Vegard Nossum wrote:
> On Tue, January 30, 2007 3:12 pm, Jan Engelhardt wrote:
> >
> >>> Why the qualifier? Zero *is* not a power of 2, is it?
> >
> > No, it is not:
> >
> > In[1]:= Solve[2^n == 0, n]
> >
> > Out[1]= {}
> >
> > So says Mathematica5.
>
> As a side note,
On Tue, January 30, 2007 3:12 pm, Jan Engelhardt wrote:
>
>>> Why the qualifier? Zero *is* not a power of 2, is it?
>
> No, it is not:
>
> In[1]:= Solve[2^n == 0, n]
>
> Out[1]= {}
>
> So says Mathematica5.
As a side note, I would just like to point out that Mathematica does not
deal w
On Wed, 31 Jan 2007, Nick Piggin wrote:
> Robert P. J. Day wrote:
> > On Tue, 30 Jan 2007, Nick Piggin wrote:
> >
> >
> > > Robert P. J. Day wrote:
> > >
> > > > Add the inline function "is_power_of_2()" to log2.h, where the value
> > > > zero is *not* considered to be a power of two.
> > >
> > >
Robert P. J. Day wrote:
On Tue, 30 Jan 2007, Nick Piggin wrote:
Robert P. J. Day wrote:
Add the inline function "is_power_of_2()" to log2.h, where the value
zero is *not* considered to be a power of two.
Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]>
/*
+ * Determine whether some
On Tue, 30 Jan 2007, Jan Engelhardt wrote:
>
> On Jan 30 2007 09:45, Robert P. J. Day wrote:
> >seriously, though, there is the potential of breaking something with
> >this change since you can see how there is some inconsistency in how
> >it's done *now* just for powerpc which, in some places, d
On Jan 30 2007 09:45, Robert P. J. Day wrote:
>On Tue, 30 Jan 2007, Jan Engelhardt wrote:
>>
>> >> Why the qualifier? Zero *is* not a power of 2, is it?
>>
>> No, it is not:
>>
>> In[1]:= Solve[2^n == 0, n]
>>
>> Out[1]= {}
>>
>> So says Mathematica5.
>
>okay, that's kind of like tak
On Tue, 30 Jan 2007, Jan Engelhardt wrote:
>
> >> Why the qualifier? Zero *is* not a power of 2, is it?
>
> No, it is not:
>
> In[1]:= Solve[2^n == 0, n]
>
> Out[1]= {}
>
> So says Mathematica5.
okay, that's kind of like taking a sandblaster to a soup cracker.
seriously, though,
>> Why the qualifier? Zero *is* not a power of 2, is it?
No, it is not:
In[1]:= Solve[2^n == 0, n]
Out[1]= {}
So says Mathematica5.
Jan
--
ft: http://freshmeat.net/p/chaostables/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a mess
On Tue, 30 Jan 2007, Nick Piggin wrote:
> Robert P. J. Day wrote:
> > Add the inline function "is_power_of_2()" to log2.h, where the value
> > zero is *not* considered to be a power of two.
>
> >
> > Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]>
> >
> > /*
> > + * Determine whether some
Robert P. J. Day wrote:
Add the inline function "is_power_of_2()" to log2.h, where the value
zero is *not* considered to be a power of two.
Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]>
/*
+ * Determine whether some value is a power of two, where zero is
+ * *not* considered a powe
Add the inline function "is_power_of_2()" to log2.h, where the value
zero is *not* considered to be a power of two.
Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]>
---
while people are coming up with more and more clever ways to do
rounding, we can at least add the check for power-of-2
21 matches
Mail list logo