MySQL 8.0.40
Source Code Documentation
bit_utils.h File Reference
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "my_compiler.h"

Go to the source code of this file.

Classes

class  BitIteratorAdaptor< Policy >
 
class  BitIteratorAdaptor< Policy >::iterator
 
class  CountBitsAscending
 
class  CountBitsDescending
 
class  NonzeroSubsetsOf
 
class  NonzeroSubsetsOf::iterator
 

Functions

size_t FindLowestBitSet (uint64_t x)
 
BitIteratorAdaptor< CountBitsAscendingBitsSetIn (uint64_t state)
 
BitIteratorAdaptor< CountBitsDescendingBitsSetInDescending (uint64_t state)
 
constexpr uint64_t TableBitmap (unsigned x)
 
template<typename... Args>
constexpr uint64_t TableBitmap (unsigned first, Args... rest)
 
uint64_t BitsBetween (unsigned start, unsigned end)
 
uint64_t TablesBetween (unsigned start, unsigned end)
 
uint64_t IsolateLowestBit (uint64_t x)
 
bool IsSubset (uint64_t x, uint64_t y)
 
bool IsProperSubset (uint64_t x, uint64_t y)
 Returns whether X is a proper subset of Y. More...
 
bool Overlaps (uint64_t x, uint64_t y)
 
bool AreMultipleBitsSet (uint64_t x)
 
bool IsSingleBitSet (uint64_t x)
 
bool IsBitSet (int bit_num, uint64_t x)
 
int PopulationCount (uint64_t x)
 

Function Documentation

◆ AreMultipleBitsSet()

bool AreMultipleBitsSet ( uint64_t  x)
inline

◆ BitsBetween()

uint64_t BitsBetween ( unsigned  start,
unsigned  end 
)
inline

◆ BitsSetIn()

BitIteratorAdaptor< CountBitsAscending > BitsSetIn ( uint64_t  state)
inline

◆ BitsSetInDescending()

BitIteratorAdaptor< CountBitsDescending > BitsSetInDescending ( uint64_t  state)
inline

◆ FindLowestBitSet()

size_t FindLowestBitSet ( uint64_t  x)
inline

◆ IsBitSet()

bool IsBitSet ( int  bit_num,
uint64_t  x 
)
inline

◆ IsolateLowestBit()

uint64_t IsolateLowestBit ( uint64_t  x)
inline

◆ IsProperSubset()

bool IsProperSubset ( uint64_t  x,
uint64_t  y 
)
inline

Returns whether X is a proper subset of Y.

◆ IsSingleBitSet()

bool IsSingleBitSet ( uint64_t  x)
inline

◆ IsSubset()

bool IsSubset ( uint64_t  x,
uint64_t  y 
)
inline

◆ Overlaps()

bool Overlaps ( uint64_t  x,
uint64_t  y 
)
inline

◆ PopulationCount()

int PopulationCount ( uint64_t  x)
inline

◆ TableBitmap() [1/2]

template<typename... Args>
constexpr uint64_t TableBitmap ( unsigned  first,
Args...  rest 
)
constexpr

◆ TableBitmap() [2/2]

constexpr uint64_t TableBitmap ( unsigned  x)
constexpr

◆ TablesBetween()

uint64_t TablesBetween ( unsigned  start,
unsigned  end 
)
inline