5 // 13 March 2007 -- tds
8 #ifndef GALAGO_BITS_HPP
9 #define GALAGO_BITS_HPP
15 inline int bits_nextUnsetBit( UINT64 bitfield
, int start
, int end
) {
16 for( int i
=start
; i
<end
; i
++ ) {
17 if( bitfield
& (1<<i
) )
30 inline int bits_nextUnsetBit( UINT64 bitfield
, int start
) {
31 return bits_nextUnsetBit( bitfield
, start
, 64 );
38 inline int bits_nextSetBit( UINT64 bitfield
, int start
, int end
) {
39 for( int i
=start
; i
<end
; i
++ ) {
40 if( !(bitfield
& (1<<i
)) )
53 inline int bits_nextSetBit( UINT64 bitfield
, int start
) {
54 return bits_nextSetBit( bitfield
, start
, 64 );
64 #endif // GALAGO_BITS_HPP