- added functions to get the index of the first or last bit set in
authorAndrei Pelinescu-Onciul <andrei@iptel.org>
Mon, 25 Jun 2007 17:20:34 +0000 (17:20 +0000)
committerAndrei Pelinescu-Onciul <andrei@iptel.org>
Mon, 25 Jun 2007 17:20:34 +0000 (17:20 +0000)
commit1353f6885a529da8d8b417e8bc85e8831dcc1906
tree7235ddbcf370aaff6d0d435d818adfc91876398d
parent0bec02f325dbb745ba35061040161d7e6a9170fc
- added functions to get the index of the first or last bit set in
a 32 bit or 64 bit int: bit_scan_forward32(), bit_scan_forward64(),
 bit_scan_reverse32(), bit_scan_reverse64(), bit_scan_forward(long) and
  bit_scan_reverse(long). All of them are very fast, they use asm
   if available (for now only for __CPU_x86 and __CPU_x86_64), and fall back
  to a de Bruijn based method or binary search (depending on which method
  was faster in my measurements on a particular cpu).
- added test/profile.h - simple measure the cpu cycles between two calls
 functions (for now support for x86, x86_64 and sparc64)
bit_scan.c [new file with mode: 0644]
bit_scan.h [new file with mode: 0644]
test/bit_scan_test.c [new file with mode: 0644]
test/profile.h [new file with mode: 0644]