MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BitmaskImpl Class Reference

#include <Bitmask.hpp>

Public Member Functions

 STATIC_CONST (NotFound=(unsigned)-1)

Static Public Member Functions

static bool get (unsigned size, const Uint32 data[], unsigned n)
static void set (unsigned size, Uint32 data[], unsigned n, bool value)
static void set (unsigned size, Uint32 data[], unsigned n)
static void set (unsigned size, Uint32 data[])
static void setRange (unsigned size, Uint32 data[], unsigned start, unsigned len)
static void assign (unsigned size, Uint32 dst[], const Uint32 src[])
static void clear (unsigned size, Uint32 data[], unsigned n)
static void clear (unsigned size, Uint32 data[])
static void clear_range (unsigned size, Uint32 data[], unsigned start, unsigned last)
static Uint32 getWord (unsigned size, Uint32 data[], unsigned word_pos)
static void setWord (unsigned size, Uint32 data[], unsigned word_pos, Uint32 new_word)
static bool isclear (unsigned size, const Uint32 data[])
static unsigned count (unsigned size, const Uint32 data[])
static unsigned ffs (Uint32 x)
static unsigned find_first (unsigned size, const Uint32 data[])
static unsigned find_next (unsigned size, const Uint32 data[], unsigned n)
static unsigned find (unsigned size, const Uint32 data[], unsigned n)
static bool equal (unsigned size, const Uint32 data[], const Uint32 data2[])
static void bitOR (unsigned size, Uint32 data[], const Uint32 data2[])
static void bitAND (unsigned size, Uint32 data[], const Uint32 data2[])
static void bitANDC (unsigned size, Uint32 data[], const Uint32 data2[])
static void bitXOR (unsigned size, Uint32 data[], const Uint32 data2[])
static void bitXORC (unsigned size, Uint32 data[], const Uint32 data2[])
static void bitNOT (unsigned size, Uint32 data[])
static bool contains (unsigned size, Uint32 data[], const Uint32 data2[])
static bool overlaps (unsigned size, Uint32 data[], const Uint32 data2[])
static Uint32 getField (unsigned size, const Uint32 data[], unsigned pos, unsigned len)
static void setField (unsigned size, Uint32 data[], unsigned pos, unsigned len, Uint32 val)
static void getField (unsigned size, const Uint32 data[], unsigned pos, unsigned len, Uint32 dst[])
static void setField (unsigned size, Uint32 data[], unsigned pos, unsigned len, const Uint32 src[])
static void copyField (Uint32 dst[], unsigned destPos, const Uint32 src[], unsigned srcPos, unsigned len)
static char * getText (unsigned size, const Uint32 data[], char *buf)
static Uint32 count_bits (Uint32 x)
static Uint32 toArray (Uint8 *dst, Uint32 len, unsigned size, const Uint32 data[])

Detailed Description

Bitmask implementation. Size (in 32-bit words) is given explicitly (as first argument). All methods are static.

Definition at line 31 of file Bitmask.hpp.

Member Function Documentation

void BitmaskImpl::assign ( unsigned  size,
Uint32  dst[],
const Uint32  src[] 
)
inlinestatic

assign - Set all bits in dst to corresponding in src/

Definition at line 275 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::bitAND ( unsigned  size,
Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

bitAND - Bitwise (x & y) into first operand.

Definition at line 484 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::bitANDC ( unsigned  size,
Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

bitANDC - Bitwise (x & ~y) into first operand.

Definition at line 492 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::bitNOT ( unsigned  size,
Uint32  data[] 
)
inlinestatic

bitNOT - Bitwise (~x) into first operand.

Definition at line 516 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::bitOR ( unsigned  size,
Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

bitOR - Bitwise (x | y) into first operand.

Definition at line 476 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::bitXOR ( unsigned  size,
Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

bitXOR - Bitwise (x ^ y) into first operand.

Definition at line 500 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::bitXORC ( unsigned  size,
Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

bitXORC - Bitwise (x ^ ~y) into first operand.

Definition at line 508 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::clear ( unsigned  size,
Uint32  data[],
unsigned  n 
)
inlinestatic

clear - Clear bit n.

Definition at line 283 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::clear ( unsigned  size,
Uint32  data[] 
)
inlinestatic

clear - Clear all bits.

Definition at line 290 of file Bitmask.hpp.

void BitmaskImpl::clear_range ( unsigned  size,
Uint32  data[],
unsigned  start,
unsigned  last 
)
inlinestatic

clear bit from start to last

Definition at line 298 of file Bitmask.hpp.

bool BitmaskImpl::contains ( unsigned  size,
Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

contains - Check if all bits set in data2 are set in data

Definition at line 524 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::copyField ( Uint32  dst[],
unsigned  destPos,
const Uint32  src[],
unsigned  srcPos,
unsigned  len 
)
inlinestatic

copyField - Copy bitfield from one position and length to another position and length. Undefined for overlapping bitfields

Definition at line 1301 of file Bitmask.hpp.

unsigned BitmaskImpl::count ( unsigned  size,
const Uint32  data[] 
)
inlinestatic

count - Count number of set bits.

Definition at line 351 of file Bitmask.hpp.

Here is the caller graph for this function:

bool BitmaskImpl::equal ( unsigned  size,
const Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

equal - Bitwise equal.

Definition at line 466 of file Bitmask.hpp.

Here is the caller graph for this function:

Uint32 BitmaskImpl::ffs ( Uint32  x)
inlinestatic

return index of first bit set inside a word undefined behaviour if non set

Definition at line 366 of file Bitmask.hpp.

Here is the caller graph for this function:

unsigned BitmaskImpl::find ( unsigned  size,
const Uint32  data[],
unsigned  n 
)
inlinestatic

find - Find first set bit, starting at given position. Returns NotFound when not found.

Definition at line 460 of file Bitmask.hpp.

Here is the call graph for this function:

unsigned BitmaskImpl::find_first ( unsigned  size,
const Uint32  data[] 
)
inlinestatic

find - Find first set bit, starting from 0 Returns NotFound when not found.

Definition at line 417 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned BitmaskImpl::find_next ( unsigned  size,
const Uint32  data[],
unsigned  n 
)
inlinestatic

find - Find first set bit, starting at given position. Returns NotFound when not found.

Definition at line 433 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool BitmaskImpl::get ( unsigned  size,
const Uint32  data[],
unsigned  n 
)
inlinestatic

get - Check if bit n is set.

Definition at line 218 of file Bitmask.hpp.

Here is the caller graph for this function:

Uint32 BitmaskImpl::getField ( unsigned  size,
const Uint32  data[],
unsigned  pos,
unsigned  len 
)
inlinestatic

getField - Get bitfield at given position and length (max 32 bits)

Definition at line 542 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::getField ( unsigned  size,
const Uint32  data[],
unsigned  pos,
unsigned  len,
Uint32  dst[] 
)
inlinestatic

getField - Get bitfield at given position and length Note : length == 0 not supported.

Definition at line 1247 of file Bitmask.hpp.

char * BitmaskImpl::getText ( unsigned  size,
const Uint32  data[],
char *  buf 
)
inlinestatic

getText - Return as hex-digits (only for debug routines).

Definition at line 560 of file Bitmask.hpp.

Here is the caller graph for this function:

bool BitmaskImpl::isclear ( unsigned  size,
const Uint32  data[] 
)
inlinestatic

isclear - Check if all bits are clear. This is faster than checking count() == 0.

Definition at line 341 of file Bitmask.hpp.

Here is the caller graph for this function:

bool BitmaskImpl::overlaps ( unsigned  size,
Uint32  data[],
const Uint32  data2[] 
)
inlinestatic

overlaps - Check if any bit set in data is set in data2

Definition at line 533 of file Bitmask.hpp.

Here is the caller graph for this function:

void BitmaskImpl::set ( unsigned  size,
Uint32  data[],
unsigned  n,
bool  value 
)
inlinestatic

set - Set bit n to given value (true/false).

Definition at line 225 of file Bitmask.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void BitmaskImpl::set ( unsigned  size,
Uint32  data[],
unsigned  n 
)
inlinestatic

set - Set bit n.

Definition at line 231 of file Bitmask.hpp.

void BitmaskImpl::set ( unsigned  size,
Uint32  data[] 
)
inlinestatic

set - Set all bits.

Definition at line 238 of file Bitmask.hpp.

void BitmaskImpl::setField ( unsigned  size,
Uint32  data[],
unsigned  pos,
unsigned  len,
Uint32  val 
)
inlinestatic

setField - Set bitfield at given position and length (max 32 bits) Note : length == 0 not supported.

Definition at line 552 of file Bitmask.hpp.

void BitmaskImpl::setField ( unsigned  size,
Uint32  data[],
unsigned  pos,
unsigned  len,
const Uint32  src[] 
)
inlinestatic

setField - Set bitfield at given position and length

Definition at line 1269 of file Bitmask.hpp.

void BitmaskImpl::setRange ( unsigned  size,
Uint32  data[],
unsigned  start,
unsigned  len 
)
inlinestatic

set len bist from start

Definition at line 246 of file Bitmask.hpp.

Here is the caller graph for this function:

Uint32 BitmaskImpl::toArray ( Uint8 *  dst,
Uint32  len,
unsigned  size,
const Uint32  data[] 
)
inlinestatic

store each set bit in dst and return bits found

Definition at line 589 of file Bitmask.hpp.


The documentation for this class was generated from the following files: