Public Member Functions | Static Public Member Functions

cl7::utilities::Bits Class Reference

#include <Bits.h>

List of all members.

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)

Constructor & Destructor Documentation

cl7::utilities::Bits::Bits ( void   ) 

Constructor.

cl7::utilities::Bits::~Bits ( void   ) 

Destructor.


Member Function Documentation

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines