GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LDT / V0-4-0
Constituent: test_rl     Tag: sun-gcc
Defines | |
#define | BW_(x) |
Replaces each 4-bit sequence in arg by the number of bits in sequence. | |
#define | BS_(x) |
Replaces each 4-bit sequence in arg by the number of bits in sequence. | |
Functions | |
static __inline unsigned int | BIT__countW (unsigned int w) |
Computes the number of bits set (1) in 32-bit argument. | |
static __inline unsigned int | BIT__countS (unsigned short int s) |
Computes the number of bits set (1) in 16-bit argument. | |
static __inline unsigned int | BIT__countB (unsigned char c) |
Computes the number of bits set (1) in 8-bit argument. |
CVS $Id: BIT.h,v 1.2 2009/04/29 23:01:53 russell Exp $
#define BS_ | ( | x | ) |
Value:
((x) - (((x)>>1)&0x7777) \ - (((x)>>2)&0x3333) \ - (((x)>>3)&0x1111))
#define BW_ | ( | x | ) |
Value:
((x) - (((x)>>1)&0x77777777) \ - (((x)>>2)&0x33333333) \ - (((x)>>3)&0x11111111))
static __inline unsigned int BIT__countB | ( | unsigned char | c | ) | [static] |
Computes the number of bits set (1) in 8-bit argument.
c | The character to count the bits in |
static __inline unsigned int BIT__countS | ( | unsigned short int | s | ) | [static] |
Computes the number of bits set (1) in 16-bit argument.
static __inline unsigned int BIT__countW | ( | unsigned int | w | ) | [static] |
Computes the number of bits set (1) in 32-bit argument.