tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kernel bitreverse function



On Sat, Apr 02, 2011 at 11:11:39PM +0200, Frank Wille wrote:
> is there already a global function to reverse the bits in a byte?

I don't think so.

> If not, wouldn't it be useful to put an optimized function (e.g. with
> a 256-byte lookup-table, or 16-byte for the two nibbles to save space)
> into the kernel, or into libkern?

Depending on the platform, one of the approaches from
http://graphics.stanford.edu/~seander/bithacks.html#BitReverseTable
makes sense.

Joerg


Home | Main Index | Thread Index | Old Index