1#ifndef BMCONST__H__INCLUDED__
2#define BMCONST__H__INCLUDED__
32#if defined(_WIN32) || defined (_WIN64)
33typedef unsigned __int64
id64_t;
35typedef unsigned long long int id64_t;
42#ifndef BM_DEFAULT_POOL_SIZE
43# define BM_DEFAULT_POOL_SIZE 4096
47const unsigned long long id_max32 = 0xFFFFFFFFull;
48const unsigned long long id_max48 = 0xFFFFFFFFFFFFull;
104const unsigned long long id_max = bm::id_max48;
129#if defined(BM64OPT) || defined(BM64_SSE4)
240 static const char _p[];
241 static const unsigned _v[3];
244#define BM_VERSION_MAJOR 7
245#define BM_VERSION_MINOR 11
246#define BM_VERSION_PATCH 2
249 "BitMagic Library. v.7.11.2 (c) 2002-2022 Anatoliy Kuznetsov.";
253#define BM_SCALAR_VERSION (((BM_VERSION_MAJOR) << 16) + ((BM_VERSION_MINOR) << 8) + (BM_VERSION_PATCH))
267 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
268 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
277 static const signed char _idx[256];
282 -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
283 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
284 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
285 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
286 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
287 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
288 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
289 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
290 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
291 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
292 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
293 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
294 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
295 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
296 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
297 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
314 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,
315 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,
316 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,
317 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,
318 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,
319 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,
320 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,
321 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
331 static unsigned char const _lut[16];
337 32U, 31U, 30U, 30U, 29U, 29U, 29U, 29U,
338 28U, 28U, 28U, 28U, 28U, 28U, 28U, 28U
346 static unsigned char const _lut[37];
352 32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11,
353 0, 13, 4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0,
354 21, 14, 9, 5, 20, 8, 19, 18
370 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff,
371 0xfff, 0x1fff, 0x3fff, 0x7fff, 0xffff, 0x1ffff, 0x3ffff, 0x7ffff,
372 0xfffff, 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff,
373 0x7ffffff, 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff
378 0xffffffff, 0xfffffffe, 0xfffffffc, 0xfffffff8, 0xfffffff0,
379 0xffffffe0, 0xffffffc0, 0xffffff80, 0xffffff00, 0xfffffe00,
380 0xfffffc00, 0xfffff800, 0xfffff000, 0xffffe000, 0xffffc000,
381 0xffff8000, 0xffff0000, 0xfffe0000, 0xfffc0000, 0xfff80000,
382 0xfff00000, 0xffe00000, 0xffc00000, 0xff800000, 0xff000000,
383 0xfe000000, 0xfc000000, 0xf8000000, 0xf0000000, 0xe0000000,
384 0xc0000000, 0x80000000
416 { 32, 96, 128, 512 };
469 unsigned char *s = (
unsigned char *)&x;
470 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.
finalization
copy strategy
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
@ READWRITE
mutable (read-write object)
@ READONLY
immutable (read-only object)
@ BM_BIT
No GAP compression strategy. All new blocks are bit blocks.
@ BM_GAP
GAP compression is ON.
const unsigned set_array_mask
const unsigned set_block_plane_cnt
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_sub_array_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_neon
! WASM SIMD 128
@ simd_avx2
!< Intel SSE4.2
@ simd_wasm128
!< Intel AVX512
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 rs3_border0_1
const unsigned gap_max_buff_len
const unsigned rs3_border1
const unsigned set_array_shift
unsigned short gap_word_t
const unsigned rs3_border1_1
const unsigned set_block_plane_size
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]
MAJOR.MINOR.PATCH version components.
static const char _p[]
Version as a text.
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]