Hello,
Does anyone know of faster ways to interweave bits from 2 or 3 integers (the
total number of result bits being less than 32, say)? The obvious way of
looping over the bits and shifting them one by one is easy to do, but there
may be a faster trick. Also the reverse operation, breaking up a bit string
into "even" and "odd" bits?
Thanks,
Aleks
--
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ LLNL
High Performance Computational Materials Science and Chemistry
E-mail: [log in to unmask]
Phone: (925) 424-6816 Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev
|