BitMagic-C++
bmutil.h File Reference

Bit manipulation primitives (internal). More...

#include "bmdef.h"
#include "bmconst.h"
#include <emmintrin.h>
Include dependency graph for bmutil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bm::bit_block_t
 bit-block array wrapped into union for correct interpretation of 32-bit vs 64-bit access vs SIMD More...
union  bm::bit_block_t::bunion_t
struct  bm::conditional< b >
 ad-hoc conditional expressions More...
struct  bm::conditional< false >
class  bm::ptr_guard< T >
 Mini auto-pointer for internal memory management. More...

Namespaces

namespace  bm

Functions

template<typename T>
T bm::min_value (T v1, T v2) BMNOEXCEPT
 Get minimum of 2 values.
template<typename T>
T bm::ilog2 (T x) BMNOEXCEPT
 Fast loop-less function to find LOG2.
template<>
bm::gap_word_t bm::ilog2 (gap_word_t x) BMNOEXCEPT
unsigned bm::count_leading_zeros (unsigned x) BMNOEXCEPT
 Portable LZCNT with (uses minimal LUT).
unsigned bm::count_trailing_zeros (unsigned v) BMNOEXCEPT
 Portable TZCNT with (uses 37-LUT).
template<typename T>
T bm::ilog2_LUT (T x) BMNOEXCEPT
 Lookup table based integer LOG2.
template<>
bm::gap_word_t bm::ilog2_LUT< bm::gap_word_t > (bm::gap_word_t x) BMNOEXCEPT
 Lookup table based short integer LOG2.
template<typename T>
T bm::bit_scan_fwd (T v) BMNOEXCEPT
unsigned bm::bit_scan_reverse32 (unsigned value) BMNOEXCEPT
unsigned bm::bit_scan_forward32 (unsigned value) BMNOEXCEPT
BMFORCEINLINE unsigned long long bm::bmi_bslr_u64 (unsigned long long w) BMNOEXCEPT
BMFORCEINLINE unsigned long long bm::bmi_blsi_u64 (unsigned long long w)
unsigned bm::count_leading_zeros_u64 (bm::id64_t w) BMNOEXCEPT
 64-bit bit-scan reverse
unsigned bm::count_trailing_zeros_u64 (bm::id64_t w) BMNOEXCEPT
 64-bit bit-scan fwd
template<class T>
unsigned bm::bit_scan_reverse (T value) BMNOEXCEPT

Detailed Description

Bit manipulation primitives (internal).

Definition in file bmutil.h.