1 #ifndef BMCONST__H__INCLUDED__ 2 #define BMCONST__H__INCLUDED__ 31 #if defined(_WIN32) || defined (_WIN64) 32 typedef unsigned __int64
id64_t;
34 typedef unsigned long long int id64_t;
41 #ifndef BM_DEFAULT_POOL_SIZE 42 # define BM_DEFAULT_POOL_SIZE 4096 46 const unsigned long long id_max32 = 0xFFFFFFFFull;
47 const unsigned long long id_max48 = 0xFFFFFFFFFFFFull;
49 const unsigned id_max32 = 0xFFFFFFFFu;
99 const unsigned long long id_max = bm::id_max48;
123 #if defined(BM64OPT) || defined(BM64_SSE4) 132 const word_t all_bits_mask = 0xffffffff;
227 static const char _p[];
228 static const unsigned _v[3];
232 "BitMagic C++ Library. v.5.0.0 (c) 2002-2019 Anatoliy Kuznetsov.";
243 static const unsigned _multiply[32];
248 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
249 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
258 static const signed char _idx[256];
263 -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
264 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
265 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
266 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
267 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
268 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
269 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
270 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
271 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
272 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
273 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
274 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
275 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
276 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
277 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
278 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
290 static const unsigned char _count[256];
295 0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
296 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
297 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
298 2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
299 1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
300 2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
301 2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
302 3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8
312 static unsigned char const _lut[16];
318 32U, 31U, 30U, 30U, 29U, 29U, 29U, 29U,
319 28U, 28U, 28U, 28U, 28U, 28U, 28U, 28U
327 static unsigned char const _lut[37];
333 32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11,
334 0, 13, 4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0,
335 21, 14, 9, 5, 20, 8, 19, 18
345 static const unsigned _left[32];
346 static const unsigned _right[32];
351 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff,
352 0xfff, 0x1fff, 0x3fff, 0x7fff, 0xffff, 0x1ffff, 0x3ffff, 0x7ffff,
353 0xfffff, 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff,
354 0x7ffffff, 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff
359 0xffffffff, 0xfffffffe, 0xfffffffc, 0xfffffff8, 0xfffffff0,
360 0xffffffe0, 0xffffffc0, 0xffffff80, 0xffffff00, 0xfffffe00,
361 0xfffffc00, 0xfffff800, 0xfffff000, 0xffffe000, 0xffffc000,
362 0xffff8000, 0xffff0000, 0xfffe0000, 0xfffc0000, 0xfff80000,
363 0xfff00000, 0xffe00000, 0xffc00000, 0xff800000, 0xff000000,
364 0xfe000000, 0xfc000000, 0xf8000000, 0xf0000000, 0xe0000000,
365 0xc0000000, 0x80000000
397 { 32, 96, 128, 512 };
448 unsigned char *s = (
unsigned char *)&x;
449 s[0] = 1; s[1] = 2; s[2] = 3; s[3] = 4;
Structure keeps all-left/right ON bits masks.
const unsigned set_block_size
Structure for TZCNT constants.
Alternative GAP lengths table. Good for for memory saver mode and very sparse bitsets.
const unsigned set_word_shift
const unsigned set_block_digest_pos_shift
const unsigned set_sub_array_size
const unsigned set_array_shift
const unsigned set_top_array_size
unsigned long long int id64_t
const unsigned gap_equiv_len
const unsigned set_total_blocks32
do not support NULL values
const unsigned rs3_border1
const unsigned rs3_border0
null_support
NULL-able value support.
Non-linear size growth GAP lengths table.
input set is sorted (ascending order)
sort_order
Sort order declaration.
const unsigned set_array_size32
const unsigned gap_max_level
static const unsigned _v[3]
const unsigned sub_block3_size
support "non-assigned" or "NULL" logic
const unsigned gap_max_buff_len
No GAP compression strategy. All new blocks are bit blocks.
static ByteOrder byte_order()
const unsigned gap_levels
Default GAP lengths table.
const unsigned set_array_mask
unsigned short gap_word_t
!< No SIMD or any other optimization
const unsigned bits_in_array
const unsigned set_blkblk_mask
const unsigned rs3_half_span
set_operation
Codes of set operations.
const unsigned bits_in_block
const unsigned set_block_size_op
const unsigned gap_max_bits
Structure to aid in counting bits table contains count of bits in 0-255 diapason of numbers...
const unsigned set_block_plain_cnt
const unsigned set_block_mask
const unsigned set_word_mask
Structure for LZCNT constants (4-bit)
const unsigned set_total_blocks
const unsigned set_block_plain_size
const unsigned set_block_shift
strategy
Block allocation strategies.
set_representation
set representation variants
ByteOrder
Byte orders recognized by the library.
const id64_t all_bits_mask
sorted and in one block (internal!)
Structure keeps index of first right 1 bit for every byte.
simd_codes
codes for supported SIMD optimizations
const unsigned set_block_alloc_size
const unsigned gap_max_bits_cmrz
const unsigned set_block_digest_wave_size