Library of Assembled Shared Sources
BitManip

Detailed Description

A set of simple bit manipulation functions.

Author
Bram de Greve
Date
2003

This module groups simple bit manipulation functions you can use on bitfields. These bitfields can be of any type for which the bit operators like &=, |=, ... are defined. Typically, you'll use int, char, unsigned, ...

The functions are split in two groups. The bit routines (with the word Bit in their names :) and the mask routines (with the word Mask). The groups are very alike, except in the way you address the bits to affect. With the bit group you will address one single bit at one time, and you will indicate it by its index in the bit field (i.e. bit 0 is 0x01, bit 1 is 0x02, bit 2 is 0x04, ...). With the mask group, you can address multiple bits at once by setting these bits in the mask (e.g. to address bits 0 and 2, you'll use 0x05 as mask). These mask must be of the same type of the bitfield.

With the routines you can set bits to 1; clear bits to 0; flip bits (0 becomes 1, 1 becomes 0); set, clear or flip bits if a condition is fullfilled; set a bit to a given value (0 or 1); check if a bit is set. For all these operations you'll find a function in both the bit group as in the mask group, except for the last operation: to check if a bit is set. In the bit group you'll find one function checkBit which will return true if the addressed bit is set. In the mask group you'll find two: checkMaskedAll and checkMaskedSome. the former only returns true if all bits addressed by the mask are set (an and operation), the latter already returns true if at least some of the addressed bits are set (an or operation).

Data Structures

struct  lass::num::lass::util::impl::BitCounter< numBytes >
 countBits helper More...
 
struct  lass::util::impl::BitCounter< numBytes >
 countBits helper More...
 

Functions

template<typename T>
void lass::num::lass::util::setBit (T &a_bits, size_t a_bit)
 Set a bit high.
 
template<typename T>
void lass::num::lass::util::clearBit (T &a_bits, size_t a_bit)
 set a bit low.
 
template<typename T>
void lass::num::lass::util::flipBit (T &a_bits, size_t a_bit)
 flip state of a bit (low->high, high->low).
 
template<typename T>
void lass::num::lass::util::setBitIf (T &a_bits, size_t a_bit, bool a_condition)
 set a bit high if (and only if) a condition is fullfilled.
 
template<typename T>
void lass::num::lass::util::clearBitIf (T &a_bits, size_t a_bit, bool a_condition)
 set a bit low if (and only if) a condition is fullfilled is true.
 
template<typename T>
void lass::num::lass::util::flipBitIf (T &a_bits, size_t a_bit, bool a_condition)
 flip a bit if (and only if) a condition is fullfilled (low->high, high->low).
 
template<typename T>
void lass::num::lass::util::setBitTo (T &a_bits, size_t a_bit, bool a_state)
 set a bit to a given state.
 
template<typename T>
bool lass::num::lass::util::checkBit (T a_bits, size_t a_bit)
 return true if a bit is set high.
 
template<typename T>
void lass::num::lass::util::setMasked (T &a_bits, const T &a_mask)
 Set masked bits high.
 
template<typename T>
void lass::num::lass::util::clearMasked (T &a_bits, const T &a_mask)
 Set masked bits low.
 
template<typename T>
void lass::num::lass::util::flipMasked (T &a_bits, const T &a_mask)
 flip masked bits.
 
template<typename T>
void lass::num::lass::util::setMaskedIf (T &a_bits, const T &a_mask, bool a_condition)
 Set masked bits high if (and only if) a condition is fullfilled.
 
template<typename T>
void lass::num::lass::util::clearMaskedIf (T &a_bits, const T &a_mask, bool a_condition)
 Set masked bits low if (and only if) a condition is fullfilled.
 
template<typename T>
void lass::num::lass::util::flipMaskedIf (T &a_bits, const T &a_mask, bool a_condition)
 Flip the masked bits if (and only if) a condition is fullfilled.
 
template<typename T>
void lass::num::lass::util::setMaskedTo (T &a_bits, const T &a_mask, bool a_state)
 Set the masked bits to a given state if (and only if) a condition is fullfilled.
 
template<typename T>
bool lass::num::lass::util::checkMaskedAll (T a_bits, const T &a_mask)
 Check the masked bits and return true if they are ALL set.
 
template<typename T>
bool lass::num::lass::util::checkMaskedSome (T a_bits, const T &a_mask)
 Check the masked bits and return true if at least one is set.
 
template<typename T>
size_t lass::num::lass::util::countBits (T bits)
 returns number of set bits in bits
 
template<typename T>
void lass::util::setBit (T &a_bits, size_t a_bit)
 Set a bit high.
 
template<typename T>
void lass::util::clearBit (T &a_bits, size_t a_bit)
 set a bit low.
 
template<typename T>
void lass::util::flipBit (T &a_bits, size_t a_bit)
 flip state of a bit (low->high, high->low).
 
template<typename T>
void lass::util::setBitIf (T &a_bits, size_t a_bit, bool a_condition)
 set a bit high if (and only if) a condition is fullfilled.
 
template<typename T>
void lass::util::clearBitIf (T &a_bits, size_t a_bit, bool a_condition)
 set a bit low if (and only if) a condition is fullfilled is true.
 
template<typename T>
void lass::util::flipBitIf (T &a_bits, size_t a_bit, bool a_condition)
 flip a bit if (and only if) a condition is fullfilled (low->high, high->low).
 
template<typename T>
void lass::util::setBitTo (T &a_bits, size_t a_bit, bool a_state)
 set a bit to a given state.
 
template<typename T>
bool lass::util::checkBit (T a_bits, size_t a_bit)
 return true if a bit is set high.
 
template<typename T>
void lass::util::setMasked (T &a_bits, const T &a_mask)
 Set masked bits high.
 
template<typename T>
void lass::util::clearMasked (T &a_bits, const T &a_mask)
 Set masked bits low.
 
template<typename T>
void lass::util::flipMasked (T &a_bits, const T &a_mask)
 flip masked bits.
 
template<typename T>
void lass::util::setMaskedIf (T &a_bits, const T &a_mask, bool a_condition)
 Set masked bits high if (and only if) a condition is fullfilled.
 
template<typename T>
void lass::util::clearMaskedIf (T &a_bits, const T &a_mask, bool a_condition)
 Set masked bits low if (and only if) a condition is fullfilled.
 
template<typename T>
void lass::util::flipMaskedIf (T &a_bits, const T &a_mask, bool a_condition)
 Flip the masked bits if (and only if) a condition is fullfilled.
 
template<typename T>
void lass::util::setMaskedTo (T &a_bits, const T &a_mask, bool a_state)
 Set the masked bits to a given state if (and only if) a condition is fullfilled.
 
template<typename T>
bool lass::util::checkMaskedAll (T a_bits, const T &a_mask)
 Check the masked bits and return true if they are ALL set.
 
template<typename T>
bool lass::util::checkMaskedSome (T a_bits, const T &a_mask)
 Check the masked bits and return true if at least one is set.
 
template<typename T>
size_t lass::util::countBits (T bits)
 returns number of set bits in bits
 

Variables

const size_t lass::num::lass::util::impl::bitsInByte [256]
 lookup table of number of bits in a byte
 
const size_t lass::util::impl::bitsInByte [256]
 lookup table of number of bits in a byte
 

Function Documentation

◆ setBit() [1/2]

template<typename T>
void lass::num::lass::util::setBit ( T & a_bits,
size_t a_bit )
inline

Set a bit high.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be set high.
a_bitthe index of the bit to be set high (0 => 0x1, 1 => 0x2, ...)

Definition at line 67 of file basic_ops.h.

◆ clearBit() [1/2]

template<typename T>
void lass::num::lass::util::clearBit ( T & a_bits,
size_t a_bit )
inline

set a bit low.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be set low.
a_bitthe index of the bit to be set low (0 => 0x1, 1 => 0x2, ...)

Definition at line 81 of file basic_ops.h.

◆ flipBit() [1/2]

template<typename T>
void lass::num::lass::util::flipBit ( T & a_bits,
size_t a_bit )
inline

flip state of a bit (low->high, high->low).

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be flipped.
a_bitthe index of the bit to be flipped (0 => 0x1, 1 => 0x2, ...)

Definition at line 95 of file basic_ops.h.

◆ setBitIf() [1/2]

template<typename T>
void lass::num::lass::util::setBitIf ( T & a_bits,
size_t a_bit,
bool a_condition )
inline

set a bit high if (and only if) a condition is fullfilled.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be set high.
a_bitthe index of the bit to be set high (0 => 0x1, 1 => 0x2, ...)
a_conditiontrue if the bit must be set high, false if not.

Definition at line 110 of file basic_ops.h.

◆ clearBitIf() [1/2]

template<typename T>
void lass::num::lass::util::clearBitIf ( T & a_bits,
size_t a_bit,
bool a_condition )
inline

set a bit low if (and only if) a condition is fullfilled is true.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be set low.
a_bitthe index of the bit to be set low (0 => 0x1, 1 => 0x2, ...)
a_conditiontrue if the bit must be set low, false if not.

Definition at line 125 of file basic_ops.h.

◆ flipBitIf() [1/2]

template<typename T>
void lass::num::lass::util::flipBitIf ( T & a_bits,
size_t a_bit,
bool a_condition )
inline

flip a bit if (and only if) a condition is fullfilled (low->high, high->low).

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be flipped.
a_bitthe index of the bit to be flipped (0 => 0x1, 1 => 0x2, ...)
a_conditiontrue if the bit must be flipped, false if not.

Definition at line 140 of file basic_ops.h.

◆ setBitTo() [1/2]

template<typename T>
void lass::num::lass::util::setBitTo ( T & a_bits,
size_t a_bit,
bool a_state )
inline

set a bit to a given state.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be set.
a_bitthe index of the bit to be set (0 => 0x1, 1 => 0x2, ...)
a_statethe state to which the bit must be set: true for high, false for low.

Definition at line 155 of file basic_ops.h.

◆ checkBit() [1/2]

template<typename T>
bool lass::num::lass::util::checkBit ( T a_bits,
size_t a_bit )
inline

return true if a bit is set high.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be checked.
a_bitthe index of the bit to be checked (0 => 0x1, 1 => 0x2, ...)

Definition at line 170 of file basic_ops.h.

◆ setMasked() [1/2]

template<typename T>
void lass::num::lass::util::setMasked ( T & a_bits,
const T & a_mask )
inline

Set masked bits high.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be set high.
a_maskmask indicating the bits that must be set high. The high bits in the mask indicate the bits in the bitfield to be set, the low bits in the mask indicate the bits in the bitfield to be left untouched.

Definition at line 188 of file basic_ops.h.

◆ clearMasked() [1/2]

template<typename T>
void lass::num::lass::util::clearMasked ( T & a_bits,
const T & a_mask )
inline

Set masked bits low.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be set low.
a_maskmask indicating the bits that must be set low. The high bits in the mask indicate the bits in the bitfield to be set, the low bits in the mask indicate the bits in the bitfield to be left untouched.

Definition at line 205 of file basic_ops.h.

◆ flipMasked() [1/2]

template<typename T>
void lass::num::lass::util::flipMasked ( T & a_bits,
const T & a_mask )
inline

flip masked bits.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be flipped.
a_maskmask indicating the bits that must be flipped. The high bits in the mask indicate the bits in the bitfield to be flipped, the low bits in the mask indicate the bits in the bitfield to be left untouched.

Definition at line 222 of file basic_ops.h.

◆ setMaskedIf() [1/2]

template<typename T>
void lass::num::lass::util::setMaskedIf ( T & a_bits,
const T & a_mask,
bool a_condition )
inline

Set masked bits high if (and only if) a condition is fullfilled.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be set high.
a_maskmask indicating the bits that must be set high. The high bits in the mask indicate the bits in the bitfield to be set, the low bits in the mask indicate the bits in the bitfield to be left untouched.
a_conditiontrue if the bits must be set, false if not.

Definition at line 240 of file basic_ops.h.

◆ clearMaskedIf() [1/2]

template<typename T>
void lass::num::lass::util::clearMaskedIf ( T & a_bits,
const T & a_mask,
bool a_condition )
inline

Set masked bits low if (and only if) a condition is fullfilled.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be set low.
a_maskmask indicating the bits that must be set low. The high bits in the mask indicate the bits in the bitfield to be set, the low bits in the mask indicate the bits in the bitfield to be left untouched.
a_conditiontrue if the bits must be set, false if not.

Definition at line 258 of file basic_ops.h.

◆ flipMaskedIf() [1/2]

template<typename T>
void lass::num::lass::util::flipMaskedIf ( T & a_bits,
const T & a_mask,
bool a_condition )
inline

Flip the masked bits if (and only if) a condition is fullfilled.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be flipped.
a_maskmask indicating the bits that must be flipped. The high bits in the mask indicate the bits in the bitfield to be flipped, the low bits in the mask indicate the bits in the bitfield to be left untouched.
a_conditiontrue if the bits must be flipped, false if not.

Definition at line 276 of file basic_ops.h.

◆ setMaskedTo() [1/2]

template<typename T>
void lass::num::lass::util::setMaskedTo ( T & a_bits,
const T & a_mask,
bool a_state )
inline

Set the masked bits to a given state if (and only if) a condition is fullfilled.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be set.
a_maskmask indicating the bits that must be set. The high bits in the mask indicate the bits in the bitfield to be set, the low bits in the mask indicate the bits in the bitfield to be left untouched.
a_statethe state to which the bits must be set: true for high, false for low.

Definition at line 294 of file basic_ops.h.

◆ checkMaskedAll() [1/2]

template<typename T>
bool lass::num::lass::util::checkMaskedAll ( T a_bits,
const T & a_mask )
inline

Check the masked bits and return true if they are ALL set.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be checked.
a_maskmask indicating the bits that must be checked. The high bits in the mask indicate the bits in the bitfield to be checked, the low bits in the mask indicate the bits in the bitfield to be left untouched.
Returns
true if ALL masked bits are set, false if not. So it also returns if only a few of the masked bits are set, but not all of them.

Definition at line 314 of file basic_ops.h.

◆ checkMaskedSome() [1/2]

template<typename T>
bool lass::num::lass::util::checkMaskedSome ( T a_bits,
const T & a_mask )
inline

Check the masked bits and return true if at least one is set.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be checked.
a_maskmask indicating the bits that must be checked. The high bits in the mask indicate the bits in the bitfield to be checked, the low bits in the mask indicate the bits in the bitfield to be left untouched.
Returns
true if at least one masked bits is set, false if not.

Definition at line 332 of file basic_ops.h.

◆ setBit() [2/2]

template<typename T>
void lass::util::setBit ( T & a_bits,
size_t a_bit )
inline

Set a bit high.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be set high.
a_bitthe index of the bit to be set high (0 => 0x1, 1 => 0x2, ...)

Definition at line 66 of file bit_manip.inl.

◆ clearBit() [2/2]

template<typename T>
void lass::util::clearBit ( T & a_bits,
size_t a_bit )
inline

set a bit low.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be set low.
a_bitthe index of the bit to be set low (0 => 0x1, 1 => 0x2, ...)

Definition at line 80 of file bit_manip.inl.

Referenced by setBitTo().

◆ flipBit() [2/2]

template<typename T>
void lass::util::flipBit ( T & a_bits,
size_t a_bit )
inline

flip state of a bit (low->high, high->low).

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be flipped.
a_bitthe index of the bit to be flipped (0 => 0x1, 1 => 0x2, ...)

Definition at line 94 of file bit_manip.inl.

◆ setBitIf() [2/2]

template<typename T>
void lass::util::setBitIf ( T & a_bits,
size_t a_bit,
bool a_condition )
inline

set a bit high if (and only if) a condition is fullfilled.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be set high.
a_bitthe index of the bit to be set high (0 => 0x1, 1 => 0x2, ...)
a_conditiontrue if the bit must be set high, false if not.

Definition at line 109 of file bit_manip.inl.

References setMasked().

Referenced by setBitTo().

◆ clearBitIf() [2/2]

template<typename T>
void lass::util::clearBitIf ( T & a_bits,
size_t a_bit,
bool a_condition )
inline

set a bit low if (and only if) a condition is fullfilled is true.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be set low.
a_bitthe index of the bit to be set low (0 => 0x1, 1 => 0x2, ...)
a_conditiontrue if the bit must be set low, false if not.

Definition at line 124 of file bit_manip.inl.

References clearMasked().

◆ flipBitIf() [2/2]

template<typename T>
void lass::util::flipBitIf ( T & a_bits,
size_t a_bit,
bool a_condition )
inline

flip a bit if (and only if) a condition is fullfilled (low->high, high->low).

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be flipped.
a_bitthe index of the bit to be flipped (0 => 0x1, 1 => 0x2, ...)
a_conditiontrue if the bit must be flipped, false if not.

Definition at line 139 of file bit_manip.inl.

References flipMasked().

◆ setBitTo() [2/2]

template<typename T>
void lass::util::setBitTo ( T & a_bits,
size_t a_bit,
bool a_state )
inline

set a bit to a given state.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be set.
a_bitthe index of the bit to be set (0 => 0x1, 1 => 0x2, ...)
a_statethe state to which the bit must be set: true for high, false for low.

Definition at line 154 of file bit_manip.inl.

References clearBit(), and setBitIf().

◆ checkBit() [2/2]

template<typename T>
bool lass::util::checkBit ( T a_bits,
size_t a_bit )
inline

return true if a bit is set high.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which a bit must be checked.
a_bitthe index of the bit to be checked (0 => 0x1, 1 => 0x2, ...)

Definition at line 169 of file bit_manip.inl.

◆ setMasked() [2/2]

template<typename T>
void lass::util::setMasked ( T & a_bits,
const T & a_mask )
inline

Set masked bits high.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be set high.
a_maskmask indicating the bits that must be set high. The high bits in the mask indicate the bits in the bitfield to be set, the low bits in the mask indicate the bits in the bitfield to be left untouched.

Definition at line 187 of file bit_manip.inl.

Referenced by setBitIf(), and setMaskedIf().

◆ clearMasked() [2/2]

template<typename T>
void lass::util::clearMasked ( T & a_bits,
const T & a_mask )
inline

Set masked bits low.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be set low.
a_maskmask indicating the bits that must be set low. The high bits in the mask indicate the bits in the bitfield to be set, the low bits in the mask indicate the bits in the bitfield to be left untouched.

Definition at line 204 of file bit_manip.inl.

Referenced by clearBitIf(), clearMaskedIf(), and setMaskedTo().

◆ flipMasked() [2/2]

template<typename T>
void lass::util::flipMasked ( T & a_bits,
const T & a_mask )
inline

flip masked bits.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be flipped.
a_maskmask indicating the bits that must be flipped. The high bits in the mask indicate the bits in the bitfield to be flipped, the low bits in the mask indicate the bits in the bitfield to be left untouched.

Definition at line 221 of file bit_manip.inl.

Referenced by flipBitIf(), and flipMaskedIf().

◆ setMaskedIf() [2/2]

template<typename T>
void lass::util::setMaskedIf ( T & a_bits,
const T & a_mask,
bool a_condition )
inline

Set masked bits high if (and only if) a condition is fullfilled.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be set high.
a_maskmask indicating the bits that must be set high. The high bits in the mask indicate the bits in the bitfield to be set, the low bits in the mask indicate the bits in the bitfield to be left untouched.
a_conditiontrue if the bits must be set, false if not.

Definition at line 239 of file bit_manip.inl.

References setMasked().

Referenced by setMaskedTo().

◆ clearMaskedIf() [2/2]

template<typename T>
void lass::util::clearMaskedIf ( T & a_bits,
const T & a_mask,
bool a_condition )
inline

Set masked bits low if (and only if) a condition is fullfilled.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be set low.
a_maskmask indicating the bits that must be set low. The high bits in the mask indicate the bits in the bitfield to be set, the low bits in the mask indicate the bits in the bitfield to be left untouched.
a_conditiontrue if the bits must be set, false if not.

Definition at line 257 of file bit_manip.inl.

References clearMasked().

◆ flipMaskedIf() [2/2]

template<typename T>
void lass::util::flipMaskedIf ( T & a_bits,
const T & a_mask,
bool a_condition )
inline

Flip the masked bits if (and only if) a condition is fullfilled.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be flipped.
a_maskmask indicating the bits that must be flipped. The high bits in the mask indicate the bits in the bitfield to be flipped, the low bits in the mask indicate the bits in the bitfield to be left untouched.
a_conditiontrue if the bits must be flipped, false if not.

Definition at line 275 of file bit_manip.inl.

References flipMasked().

◆ setMaskedTo() [2/2]

template<typename T>
void lass::util::setMaskedTo ( T & a_bits,
const T & a_mask,
bool a_state )
inline

Set the masked bits to a given state if (and only if) a condition is fullfilled.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be set.
a_maskmask indicating the bits that must be set. The high bits in the mask indicate the bits in the bitfield to be set, the low bits in the mask indicate the bits in the bitfield to be left untouched.
a_statethe state to which the bits must be set: true for high, false for low.

Definition at line 293 of file bit_manip.inl.

References clearMasked(), and setMaskedIf().

◆ checkMaskedAll() [2/2]

template<typename T>
bool lass::util::checkMaskedAll ( T a_bits,
const T & a_mask )
inline

Check the masked bits and return true if they are ALL set.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be checked.
a_maskmask indicating the bits that must be checked. The high bits in the mask indicate the bits in the bitfield to be checked, the low bits in the mask indicate the bits in the bitfield to be left untouched.
Returns
true if ALL masked bits are set, false if not. So it also returns if only a few of the masked bits are set, but not all of them.

Definition at line 313 of file bit_manip.inl.

◆ checkMaskedSome() [2/2]

template<typename T>
bool lass::util::checkMaskedSome ( T a_bits,
const T & a_mask )
inline

Check the masked bits and return true if at least one is set.

Author
Bram de Greve [Bramz]
Parameters
a_bitsthe bitfield of which some bits must be checked.
a_maskmask indicating the bits that must be checked. The high bits in the mask indicate the bits in the bitfield to be checked, the low bits in the mask indicate the bits in the bitfield to be left untouched.
Returns
true if at least one masked bits is set, false if not.

Definition at line 331 of file bit_manip.inl.