cds  2.3.2
cds::bitop Namespace Reference

Bit operations. More...

Functions

template<typename T >
static int LSB (T nArg)
 Get least significant bit (LSB) number (1..32/64), 0 if nArg == 0.
 
template<typename T >
static int LSBnz (T nArg)
 Get least significant bit (LSB) number (0..31/63) More...
 
template<typename T >
static int MSB (T nArg)
 Get most significant bit (MSB) number (1..32/64), 0 if nArg == 0.
 
template<typename T >
static int MSBnz (T nArg)
 Get most significant bit (MSB) number (0..31/63) More...
 
template<typename T >
static int SBC (T nArg)
 Get non-zero bit count of a word.
 
template<typename T >
static int ZBC (T nArg)
 Get zero bit count of a word.
 
template<typename T >
static T RBO (T nArg)
 Reverse bit order of nArg.
 
template<typename T >
static bool complement (T &nArg, int nBit)
 Complement bit nBit in nArg.
 
template<typename T >
static T RandXorShift (T x)
 Simple random number generator.
 

Detailed Description

Bit operations.

Function Documentation

◆ LSBnz()

template<typename T >
static int cds::bitop::LSBnz ( nArg)
inlinestatic

Get least significant bit (LSB) number (0..31/63)

Precondition: nArg != 0

◆ MSBnz()

template<typename T >
static int cds::bitop::MSBnz ( nArg)
inlinestatic

Get most significant bit (MSB) number (0..31/63)

Precondition: nArg != 0


cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:16 by Doxygen 1.8.13