#include <Bits.h>
Public Member Functions | |
| Bits (void) | |
| ~Bits (void) | |
Static Public Member Functions | |
| static unsigned | count32 (unsigned long x) |
| static unsigned | count (unsigned x) |
| static unsigned short | endianness (unsigned short x) |
| static unsigned long | endianness (unsigned long x) |
| cl7::utilities::Bits::Bits | ( | void | ) |
Constructor.
| cl7::utilities::Bits::~Bits | ( | void | ) |
Destructor.
| unsigned cl7::utilities::Bits::count | ( | unsigned | x | ) | [static] |
Counts the number of bits set in the given integer number. This is quite fast but does not run in constant time. If you are facing 32 (or less) bit values, use count32 instead.
| unsigned cl7::utilities::Bits::count32 | ( | unsigned long | x | ) | [static] |
Counts the number of bits set in the given 32 bit word. This one is really fast as it runs in constant time with constant memory! But, it is restricted to 32 (or less) bit values.
| static unsigned short cl7::utilities::Bits::endianness | ( | unsigned short | x | ) | [inline, static] |
Switches the byte endianness of the given 16 bit word.
| static unsigned long cl7::utilities::Bits::endianness | ( | unsigned long | x | ) | [inline, static] |
Switches the byte endianness of the given 32 bit word.
1.7.1