Re: [tip:perf/core] bitops: Provide compile time HWEIGHT{8,16,32,64}
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [tip:perf/core] bitops: Provide compile time HWEIGHT{8,16,32,64}
- From: "H. Peter Anvin" <hpa@xxxxxxxxx>
- Date: Fri, 29 Jan 2010 14:50:46 -0800
- Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, mingo@xxxxxxxxxx, eranian@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, torvalds@xxxxxxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxx, linux-tip-commits@xxxxxxxxxxxxxxx
- In-reply-to: <1264763023.4283.2213.camel@laptop>
- References: <20100122155535.797688466@xxxxxxxxx> <tip-9f41699ed067fa695faff8e2e9981b2550abec62@xxxxxxxxxxxxxx> <20100129020128.716af8fb.akpm@xxxxxxxxxxxxxxxxxxxx> <1264763023.4283.2213.camel@laptop>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1
On 01/29/2010 03:03 AM, Peter Zijlstra wrote:
>
> *sigh* and here I though it being placed right next to hweight_long()
> which uses the arch hweightN() would be clue enough.
>
> If people are so clueless, who says they'll read a comment.. but sure I
> guess I can add one.
>
I would personally say that the Right Way[TM] to do this is to call
these __constant_hweightX() -- so the name reflects the function -- and
then have
#define hweight(x) (__builtin_constant_p(x) ? __constant_hweight(x) :
__arch_hweight(x))
[example does not reflect actual naming]
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
- Prev by Date:
Re: [tip:perf/core] bitops: Provide compile time HWEIGHT{8,16,32,64}
- Next by Date:
[tip:x86/apic] x86, irq: Move __setup_vector_irq() before the first irq enable in cpu online path
- Previous by thread:
Re: [tip:perf/core] bitops: Provide compile time HWEIGHT{8,16,32,64}
- Next by thread:
Re: [tip:perf/core] bitops: Provide compile time HWEIGHT{8,16,32,64}
- Index(es):
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]