BitOps.H File Reference
Include dependency graph for BitOps.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  bitInfo< UIntType >
 An (unsigned) integral type adapter, for output of bit values. More...
 

Namespaces

 Foam::BitOps
 Various bit-wise operations, etc.
 
 Foam::BitSetOps
 Factory and other methods for bitSet.
 
 Foam
 Namespace for OpenFOAM.
 

Functions

unsigned int count (const UList< bool > &bools, const bool val=true)
 Count number of 'true' entries. More...
 
bool all (const UList< bool > &bools)
 True if all entries are 'true' or if the set is empty. More...
 
bool any (const UList< bool > &bools)
 True if any entries are 'true'. More...
 
bool none (const UList< bool > &bools)
 True if no entries are 'true'. More...
 
template<class UIntType >
unsigned int bit_count (UIntType x)
 Count arbitrary number of bits (of an integral type) More...
 
template<>
unsigned int bit_count (uint32_t x)
 Count bits in a 32-bit value (Hamming weight method) More...
 
template<>
unsigned int bit_count (uint64_t x)
 Count bits in a 64-bit value (Hamming weight method) More...
 
template<class UIntType , unsigned BitWidth>
UIntType repeat_value (unsigned val)
 Repeat a value of the given BitWidth into the destination output type. More...
 
template<class UIntType >
Ostream & print (Ostream &os, UIntType value, char off='0', char on='1')
 Print 0/1 bits in the (unsigned) integral type. More...
 
bitSet create (const label n, const labelHashSet &locations, const bool on=true)
 Create a bitSet with length n with the specifed on locations. More...
 
bitSet create (const label n, const labelUList &locations, const bool on=true)
 Create a bitSet with length n with the specifed on locations. More...
 
bitSet create (const label n, const label select, const labelUList &values, const bool on=true)
 
template<class UIntType >
Ostream & operator<< (Ostream &os, const BitOps::bitInfo< UIntType > &info)
 Print 0/1 bits of an (unsigned) integral type via an adapter. More...
 

Detailed Description

Original source file BitOps.H

Definition in file BitOps.H.