From: Grant Grundler <iod00d@hp.com>
To: linux@horizon.com
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
mita@miraclelinux.com
Subject: Re: [PATCH 8/12] generic hweight{32,16,8}()
Date: Tue, 31 Jan 2006 10:14:01 -0800 [thread overview]
Message-ID: <20060131181401.GB10640@esmail.cup.hp.com> (raw)
In-Reply-To: <20060131164949.3365.qmail@science.horizon.com>
On Tue, Jan 31, 2006 at 11:49:49AM -0500, linux@horizon.com wrote:
> This is an extremely well-known technique. You can see a similar version
> that uses a multiply for the last few steps at
> http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
> whch refers to
> "Software Optimization Guide for AMD Athlon 64 and Opteron Processors"
> http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25112.PDF
...
> The next step consists of breaking up b (made of 16 2-bir fields) into
> even and odd halves and adding them into 4-bit fields. Since the largest
> possible sum is 2+2 = 4, which will not fit into a 4-bit field, the 2-bit
> fields have to be masked before they are added.
Up to here, things were clear.
My guess is you meant "which will not fit into a 2-bit field".
thanks,
grant
next prev parent reply other threads:[~2006-01-31 18:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-31 16:49 [PATCH 8/12] generic hweight{32,16,8}() linux
2006-01-31 18:14 ` Grant Grundler [this message]
2006-02-02 9:34 ` Balbir Singh
-- strict thread matches above, loose matches on Subject: below --
2006-01-25 11:26 [PATCH 0/6] RFC: use include/asm-generic/bitops.h Akinobu Mita
2006-01-25 11:32 ` [PATCH 3/6] C-language equivalents of include/asm-*/bitops.h Akinobu Mita
2006-01-25 20:02 ` Russell King
2006-01-25 20:59 ` Grant Grundler
2006-01-26 3:27 ` Akinobu Mita
2006-01-26 3:36 ` [PATCH 8/12] generic hweight{32,16,8}() Akinobu Mita
2006-01-26 7:12 ` Balbir Singh
2006-01-26 10:04 ` Rutger Nijlunsing
2006-01-27 4:55 ` Akinobu Mita
2006-01-27 5:40 ` Balbir Singh
2006-01-27 6:40 ` Akinobu Mita
2006-01-31 11:14 ` Balbir Singh
2006-01-26 18:57 ` Bryan O'Sullivan
2006-01-27 4:43 ` Akinobu Mita
2006-01-27 5:23 ` Bryan O'Sullivan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060131181401.GB10640@esmail.cup.hp.com \
--to=iod00d@hp.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.com \
--cc=mita@miraclelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).