CrystalSpace

Public API Reference

CS::Utility::BitOps Namespace Reference

Bit operations. More...


Functions

uint32 ComputeBitsSet (uint32 v)
 Compute number of bits set in given number.
bool ScanBitForward (uint32 value, size_t &index)
 Compute index of first bit set, scanned from LSB to MSB.
bool ScanBitReverse (uint32 value, size_t &index)
 Compute index of first bit set, scanned from MSB to LSB.


Detailed Description

Bit operations.

Function Documentation

uint32 CS::Utility::BitOps::ComputeBitsSet ( uint32  v  ) 

Compute number of bits set in given number.

Definition at line 90 of file bitops.h.

Referenced by csBitArrayTweakable< >::NumBitsSet().

bool CS::Utility::BitOps::ScanBitForward ( uint32  value,
size_t &  index 
)

Compute index of first bit set, scanned from LSB to MSB.

Returns:
true if any bit is found
Parameters:
value Input value
index Index of first bit set

Definition at line 38 of file bitops.h.

bool CS::Utility::BitOps::ScanBitReverse ( uint32  value,
size_t &  index 
)

Compute index of first bit set, scanned from MSB to LSB.

Returns:
true if any bit is found
Parameters:
value Input value
index Index of first bit set

Definition at line 66 of file bitops.h.


Generated for Crystal Space 1.2.1 by doxygen 1.5.3