atlas  0.6
Functions
atlas::bits Namespace Reference

Functions

unsigned int bitCount (unsigned long x)
 
size_t firstBit (unsigned long f)
 
size_t lastBit (unsigned long f)
 

Function Documentation

unsigned atlas::bits::bitCount ( unsigned long  x)

Synopsis: returns the sum of the bits (i.e., the number of set bits) in x.

size_t atlas::bits::firstBit ( unsigned long  f)

Synopsis: returns the position of the first set bit in f.

Returns longBits if there is no such bit.

size_t atlas::bits::lastBit ( unsigned long  f)

Synopsis: returns the position of the last (most significant) set bit in f, PLUS ONE. Returns 0 if there is no such bit.