MySQL 5.6.14 Source Code Document
|
#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[]) |
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.
|
inlinestatic |
assign - Set all bits in dst to corresponding in src/
Definition at line 275 of file Bitmask.hpp.
|
inlinestatic |
bitAND - Bitwise (x & y) into first operand.
Definition at line 484 of file Bitmask.hpp.
|
inlinestatic |
bitANDC - Bitwise (x & ~y) into first operand.
Definition at line 492 of file Bitmask.hpp.
|
inlinestatic |
bitNOT - Bitwise (~x) into first operand.
Definition at line 516 of file Bitmask.hpp.
|
inlinestatic |
bitOR - Bitwise (x | y) into first operand.
Definition at line 476 of file Bitmask.hpp.
|
inlinestatic |
bitXOR - Bitwise (x ^ y) into first operand.
Definition at line 500 of file Bitmask.hpp.
|
inlinestatic |
bitXORC - Bitwise (x ^ ~y) into first operand.
Definition at line 508 of file Bitmask.hpp.
|
inlinestatic |
clear - Clear bit n.
Definition at line 283 of file Bitmask.hpp.
|
inlinestatic |
clear - Clear all bits.
Definition at line 290 of file Bitmask.hpp.
|
inlinestatic |
clear bit from start to last
Definition at line 298 of file Bitmask.hpp.
|
inlinestatic |
contains - Check if all bits set in data2 are set in data
Definition at line 524 of file Bitmask.hpp.
|
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.
|
inlinestatic |
count - Count number of set bits.
Definition at line 351 of file Bitmask.hpp.
|
inlinestatic |
equal - Bitwise equal.
Definition at line 466 of file Bitmask.hpp.
|
inlinestatic |
return index of first bit set inside a word undefined behaviour if non set
Definition at line 366 of file Bitmask.hpp.
|
inlinestatic |
find - Find first set bit, starting at given position. Returns NotFound when not found.
Definition at line 460 of file Bitmask.hpp.
|
inlinestatic |
find - Find first set bit, starting from 0 Returns NotFound when not found.
Definition at line 417 of file Bitmask.hpp.
|
inlinestatic |
find - Find first set bit, starting at given position. Returns NotFound when not found.
Definition at line 433 of file Bitmask.hpp.
|
inlinestatic |
get - Check if bit n is set.
Definition at line 218 of file Bitmask.hpp.
|
inlinestatic |
getField - Get bitfield at given position and length (max 32 bits)
Definition at line 542 of file Bitmask.hpp.
|
inlinestatic |
getField - Get bitfield at given position and length Note : length == 0 not supported.
Definition at line 1247 of file Bitmask.hpp.
|
inlinestatic |
getText - Return as hex-digits (only for debug routines).
Definition at line 560 of file Bitmask.hpp.
|
inlinestatic |
isclear - Check if all bits are clear. This is faster than checking count() == 0.
Definition at line 341 of file Bitmask.hpp.
|
inlinestatic |
overlaps - Check if any bit set in data is set in data2
Definition at line 533 of file Bitmask.hpp.
|
inlinestatic |
set - Set bit n to given value (true/false).
Definition at line 225 of file Bitmask.hpp.
|
inlinestatic |
set - Set bit n.
Definition at line 231 of file Bitmask.hpp.
|
inlinestatic |
set - Set all bits.
Definition at line 238 of file Bitmask.hpp.
|
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.
|
inlinestatic |
setField - Set bitfield at given position and length
Definition at line 1269 of file Bitmask.hpp.
|
inlinestatic |
set len bist from start
Definition at line 246 of file Bitmask.hpp.
|
inlinestatic |
store each set bit in dst and return bits found
Definition at line 589 of file Bitmask.hpp.