1#ifndef BMCONST__H__INCLUDED__
2#define BMCONST__H__INCLUDED__
31#if defined(_WIN32) || defined (_WIN64)
32typedef unsigned __int64
id64_t;
34typedef unsigned long long int id64_t;
41#ifndef BM_DEFAULT_POOL_SIZE
42# define BM_DEFAULT_POOL_SIZE 4096
46const unsigned long long id_max32 = 0xFFFFFFFFull;
47const unsigned long long id_max48 = 0xFFFFFFFFFFFFull;
103const unsigned long long id_max = bm::id_max48;
126#if defined(BM64OPT) || defined(BM64_SSE4)
226 static const char _p[];
227 static const unsigned _v[3];
231 "BitMagic C++ Library. v.6.3.0 (c) 2002-2020 Anatoliy Kuznetsov.";
247 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
248 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
257 static const signed char _idx[256];
262 -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
263 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
264 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
265 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
266 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
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 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
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,
294 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,
295 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,
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 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,
298 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,
299 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,
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 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
311 static unsigned char const _lut[16];
317 32U, 31U, 30U, 30U, 29U, 29U, 29U, 29U,
318 28U, 28U, 28U, 28U, 28U, 28U, 28U, 28U
326 static unsigned char const _lut[37];
332 32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11,
333 0, 13, 4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0,
334 21, 14, 9, 5, 20, 8, 19, 18
350 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff,
351 0xfff, 0x1fff, 0x3fff, 0x7fff, 0xffff, 0x1ffff, 0x3ffff, 0x7ffff,
352 0xfffff, 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff,
353 0x7ffffff, 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff
358 0xffffffff, 0xfffffffe, 0xfffffffc, 0xfffffff8, 0xfffffff0,
359 0xffffffe0, 0xffffffc0, 0xffffff80, 0xffffff00, 0xfffffe00,
360 0xfffffc00, 0xfffff800, 0xfffff000, 0xffffe000, 0xffffc000,
361 0xffff8000, 0xffff0000, 0xfffe0000, 0xfffc0000, 0xfff80000,
362 0xfff00000, 0xffe00000, 0xffc00000, 0xff800000, 0xff000000,
363 0xfe000000, 0xfc000000, 0xf8000000, 0xf0000000, 0xe0000000,
364 0xc0000000, 0x80000000
396 { 32, 96, 128, 512 };
447 unsigned char *s = (
unsigned char *)&x;
448 s[0] = 1; s[1] = 2; s[2] = 3; s[3] = 4;
sort_order
Sort order declaration.
set_operation
Codes of set operations.
null_support
NULL-able value support.
strategy
Block allocation strategies.
@ BM_UNSORTED
input set is NOT sorted
@ BM_SORTED
input set is sorted (ascending order)
@ BM_UNKNOWN
sort order unknown
@ BM_SORTED_UNIFORM
sorted and in one block (internal!)
@ use_null
support "non-assigned" or "NULL" logic
@ no_null
do not support NULL values
@ BM_BIT
No GAP compression strategy. All new blocks are bit blocks.
@ BM_GAP
GAP compression is ON.
const unsigned set_array_mask
const id64_t all_bits_mask
const unsigned set_block_digest_wave_size
const unsigned gap_max_level
const unsigned set_block_mask
const unsigned set_total_blocks32
const unsigned set_blkblk_mask
const unsigned set_block_plain_cnt
const unsigned set_sub_array_size
const unsigned set_block_plain_size
const unsigned gap_max_bits_cmrz
const unsigned sub_block3_size
const unsigned bits_in_array
const unsigned set_total_blocks
ByteOrder
Byte orders recognized by the library.
set_representation
set representation variants
@ set_bitset
Simple bitset.
@ set_gap
GAP-RLE compression.
@ set_array1
array of set 1 values
@ set_array0
array of 0 values
const unsigned bie_cut_off
simd_codes
codes for supported SIMD optimizations
@ simd_sse42
!< Intel SSE2
@ simd_sse2
!< No SIMD or any other optimization
@ simd_avx512
!< Intel AVX2
@ simd_avx2
!< Intel SSE4.2
const unsigned set_block_size_op
const unsigned rs3_half_span
const unsigned gap_levels
const unsigned set_word_shift
const unsigned set_array_size32
const unsigned set_sub_total_bits
const unsigned set_block_digest_pos_shift
const unsigned set_block_size
unsigned long long int id64_t
const unsigned block_waves
const unsigned gap_equiv_len
const unsigned set_block_alloc_size
const unsigned gap_max_buff_len
const unsigned rs3_border1
const unsigned set_array_shift
unsigned short gap_word_t
const unsigned rs3_border0
const unsigned gap_max_bits
const unsigned set_top_array_size
const unsigned set_block_shift
const unsigned set_word_mask
const unsigned bits_in_block
static const unsigned _multiply[32]
static const unsigned _v[3]
Structure to aid in counting bits table contains count of bits in 0-255 diapason of numbers.
static const unsigned char _count[256]
Structure keeps all-left/right ON bits masks.
static const unsigned _left[32]
static const unsigned _right[32]
Structure keeps index of first right 1 bit for every byte.
static const signed char _idx[256]
Alternative GAP lengths table. Good for for memory saver mode and very sparse bitsets.
static const gap_word_t _len[bm::gap_levels]
Non-linear size growth GAP lengths table.
static const gap_word_t _len[bm::gap_levels]
Default GAP lengths table.
static const gap_word_t _len[bm::gap_levels]
static ByteOrder byte_order()
Structure for LZCNT constants (4-bit)
static unsigned char const _lut[16]
Structure for TZCNT constants.
static unsigned char const _lut[37]