bmconst.h
Go to the documentation of this file.
#ifndef BMCONST__H__INCLUDED__
#define BMCONST__H__INCLUDED__
/*
Copyright(c) 2002-2017 Anatoliy Kuznetsov(anatoliy_kuznetsov at yahoo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information please visit: http://bitmagic.io
*/
/*! \file bmconst.h
\brief Constants, lookup tables and typedefs
@internal
*/
#include <cstdint>
#include <inttypes.h>
namespace bm
{
#if defined(_WIN32) || defined (_WIN64)
typedef unsigned __int64 id64_t;
#else
typedef unsigned long long int id64_t;
#endif
typedef unsigned int id_t;
typedef unsigned int word_t;
typedef unsigned short short_t;
#ifndef BM_DEFAULT_POOL_SIZE
# define BM_DEFAULT_POOL_SIZE 4096
#endif
#ifdef BM64ADDR
const unsigned long long id_max32 = 0xFFFFFFFFull;
const unsigned long long id_max48 = 0xFFFFFFFFFFFFull;
#else
const unsigned id_max32 = 0xFFFFFFFFu;
#endif
// Data Block parameters
const unsigned set_block_size = 2048u;
const unsigned set_block_shift = 16u;
const unsigned set_block_mask = 0xFFFFu;
const unsigned set_blkblk_mask = 0xFFFFFFu;
// set block size in bytes
const unsigned set_block_alloc_size = bm::set_block_size * unsigned(sizeof(bm::word_t));
const unsigned set_block_plane_size = bm::set_block_size / 32u;
const unsigned set_block_plane_cnt = (unsigned)(sizeof(bm::word_t) * 8u);
const unsigned block_waves = 64;
const unsigned set_block_digest_wave_size = bm::set_block_size / bm::block_waves;
const unsigned set_block_digest_pos_shift = 10;
// Word parameters
const unsigned set_word_shift = 5u;
const unsigned set_word_mask = 0x1Fu;
// GAP related parameters.
typedef unsigned short gap_word_t;
const unsigned gap_max_buff_len = 1280;
const unsigned gap_max_bits = 65536;
const unsigned gap_equiv_len = (unsigned)
((sizeof(bm::word_t) * bm::set_block_size) / sizeof(bm::gap_word_t));
const unsigned gap_max_bits_cmrz = bm::gap_max_bits / 2;
const unsigned gap_levels = 4;
const unsigned gap_max_level = bm::gap_levels - 1;
const unsigned bie_cut_off = 16384; // binary interpolative encode size cut-off
// Block Array parameters
const unsigned set_array_size32 = 256u;
const unsigned set_sub_array_size = set_array_size32;
const unsigned set_array_shift = 8u;
const unsigned set_array_mask = 0xFFu;
const unsigned set_total_blocks32 = (bm::set_array_size32 * bm::set_array_size32);
const unsigned set_sub_total_bits = bm::set_sub_array_size * bm::gap_max_bits;
#ifdef BM64ADDR
const unsigned set_total_blocks48 = bm::id_max48 / bm::gap_max_bits;
const unsigned long long id_max = bm::id_max48;
const unsigned long long set_array_size48 = 1 + (bm::id_max48 / set_sub_total_bits);
const unsigned set_top_array_size = bm::set_array_size48;
const id64_t set_total_blocks = id64_t(bm::set_top_array_size) * set_sub_array_size;
#else
const unsigned id_max = bm::id_max32;
const unsigned set_top_array_size = bm::set_array_size32;
const unsigned set_total_blocks = bm::set_total_blocks32;
#endif
const unsigned bits_in_block = bm::set_block_size * unsigned((sizeof(bm::word_t) * 8));
const unsigned bits_in_array = bm::bits_in_block * bm::set_array_size32;
// Rank-Select parameters (linear address to split the searches
const unsigned rs3_border0 = 21824; // 682 words by 32-bits
const unsigned rs3_border1 = (rs3_border0 * 2); // 43648
const unsigned rs3_half_span = rs3_border0 / 2;
const unsigned rs3_border0_1 = rs3_border0 + rs3_half_span; // intermed pnt 1
const unsigned rs3_border1_1 = rs3_border1 + rs3_half_span; // intermed pnt 2
// misc parameters for sparse vec algorithms
//const unsigned sub_bfind_block_cnt = 32; // bfind discretization factor
//const unsigned sub_block_l1_size =
// bm::gap_max_bits / bm::sub_bfind_block_cnt; // size in bits/elements
#if defined(BM64OPT) || defined(BM64_SSE4)
typedef id64_t wordop_t;
const id64_t all_bits_mask = 0xffffffffffffffffULL;
const unsigned set_block_size_op = bm::set_block_size / 2;
#else
typedef word_t wordop_t;
const word_t all_bits_mask = 0xffffffff;
const unsigned set_block_size_op = bm::set_block_size;
#endif
/*!
@brief Block allocation strategies.
@ingroup bvector
*/
enum strategy
{
BM_BIT = 0, //!< No GAP compression strategy. All new blocks are bit blocks.
BM_GAP = 1 //!< GAP compression is ON.
};
/*!
@brief copy strategy
@ingroup bvector
*/
enum class finalization
{
UNDEFINED = 0,
READONLY = 1, //!< immutable (read-only object)
READWRITE = 2, //!< mutable (read-write object)
};
/**
Codes of set operations
@ingroup bvector
*/
enum set_operation
{
set_AND = 0,
set_OR = 1,
set_SUB = 2,
set_XOR = 3,
set_ASSIGN = 4,
set_COUNT = 5,
set_COUNT_AND = 6,
set_COUNT_XOR = 7,
set_COUNT_OR = 8,
set_COUNT_SUB_AB= 9,
set_COUNT_SUB_BA= 10,
set_COUNT_A = 11,
set_COUNT_B = 12,
set_END
};
/**
Bit operations
@ingroup bvector
*/
enum operation
{
BM_AND = set_AND,
BM_OR = set_OR,
BM_SUB = set_SUB,
BM_XOR = set_XOR
};
/*!
@brief Sort order declaration
@ingroup bvector
*/
enum sort_order
{
BM_UNSORTED = 0, //!< input set is NOT sorted
BM_SORTED = 1, //!< input set is sorted (ascending order)
BM_SORTED_UNIFORM = 2, //!< sorted and in one block (internal!)
BM_UNKNOWN = 3 //!< sort order unknown
};
/*!
@brief set representation variants
@internal
*/
enum set_representation
{
set_bitset = 0, //!< Simple bitset
set_gap = 1, //!< GAP-RLE compression
set_array1 = 2, //!< array of set 1 values
set_array0 = 3 //!< array of 0 values
};
/*!
@brief NULL-able value support
@ingroup bvector
*/
enum null_support
{
use_null = 0, //!< support "non-assigned" or "NULL" logic
no_null = 1 //!< do not support NULL values
};
/**
Internal structure. Copyright information.
@internal
*/
template<bool T> struct _copyright
{
static const char _p[]; ///< Version as a text
static const unsigned _v[3]; ///< MAJOR.MINOR.PATCH version components
};
#define BM_VERSION_MAJOR 7
#define BM_VERSION_MINOR 13
#define BM_VERSION_PATCH 4
template<bool T> const char _copyright<T>::_p[] =
"BitMagic Library. v.7.13.4 (c) 2002-2022 Anatoliy Kuznetsov.";
template<bool T> const unsigned _copyright<T>::_v[3] =
{ BM_VERSION_MAJOR, BM_VERSION_MINOR, BM_VERSION_PATCH };
#define BM_SCALAR_VERSION (((BM_VERSION_MAJOR) << 16) + ((BM_VERSION_MINOR) << 8) + (BM_VERSION_PATCH))
/**
DeBruijn majic table
@internal
*/
template<bool T> struct DeBruijn_bit_position
{
static const unsigned _multiply[32];
};
template<bool T>
const unsigned DeBruijn_bit_position<T>::_multiply[32] = {
0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
};
/**
Structure keeps index of first right 1 bit for every byte.
@ingroup bitfunc
*/
template<bool T> struct first_bit_table
{
static const signed char _idx[256];
};
template<bool T>
const signed char first_bit_table<T>::_idx[256] = {
-1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
};
//---------------------------------------------------------------------
/** Structure to aid in counting bits
table contains count of bits in 0-255 diapason of numbers
@ingroup bitfunc
*/
template<bool T> struct bit_count_table
{
static const unsigned char _count[256];
};
template<bool T>
const unsigned char bit_count_table<T>::_count[256] = {
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,
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,
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,
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,
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,
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,
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,
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
};
//---------------------------------------------------------------------
/** Structure for LZCNT constants (4-bit)
@ingroup bitfunc
*/
template<bool T> struct lzcnt_table
{
static unsigned char const _lut[16];
};
template<bool T>
const unsigned char lzcnt_table<T>::_lut[16] =
{
32U, 31U, 30U, 30U, 29U, 29U, 29U, 29U,
28U, 28U, 28U, 28U, 28U, 28U, 28U, 28U
};
/** Structure for TZCNT constants
@ingroup bitfunc
*/
template<bool T> struct tzcnt_table
{
static unsigned char const _lut[37];
};
template<bool T>
const unsigned char tzcnt_table<T>::_lut[37] =
{
32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11,
0, 13, 4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0,
21, 14, 9, 5, 20, 8, 19, 18
};
/** Structure keeps all-left/right ON bits masks.
@ingroup bitfunc
*/
template<bool T> struct block_set_table
{
static const unsigned _left[32];
static const unsigned _right[32];
};
template<bool T>
const unsigned block_set_table<T>::_left[32] = {
0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff,
0xfff, 0x1fff, 0x3fff, 0x7fff, 0xffff, 0x1ffff, 0x3ffff, 0x7ffff,
0xfffff, 0x1fffff, 0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff,
0x7ffffff, 0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff
};
template<bool T>
const unsigned block_set_table<T>::_right[32] = {
0xffffffff, 0xfffffffe, 0xfffffffc, 0xfffffff8, 0xfffffff0,
0xffffffe0, 0xffffffc0, 0xffffff80, 0xffffff00, 0xfffffe00,
0xfffffc00, 0xfffff800, 0xfffff000, 0xffffe000, 0xffffc000,
0xffff8000, 0xffff0000, 0xfffe0000, 0xfffc0000, 0xfff80000,
0xfff00000, 0xffe00000, 0xffc00000, 0xff800000, 0xff000000,
0xfe000000, 0xfc000000, 0xf8000000, 0xf0000000, 0xe0000000,
0xc0000000, 0x80000000
};
//---------------------------------------------------------------------
/*! @brief Default GAP lengths table.
@ingroup gapfunc
*/
template<bool T> struct gap_len_table
{
static const gap_word_t _len[bm::gap_levels];
};
template<bool T>
const gap_word_t gap_len_table<T>::_len[bm::gap_levels] =
{ 128, 256, 512, bm::gap_max_buff_len };
/*! @brief Alternative GAP lengths table.
Good for for memory saver mode and very sparse bitsets.
@ingroup gapfunc
*/
template<bool T> struct gap_len_table_min
{
static const gap_word_t _len[bm::gap_levels];
};
template<bool T>
const gap_word_t gap_len_table_min<T>::_len[bm::gap_levels] =
{ 32, 96, 128, 512 };
/*! @brief Non-linear size growth GAP lengths table.
@ingroup gapfunc
*/
template<bool T> struct gap_len_table_nl
{
static const gap_word_t _len[bm::gap_levels];
};
template<bool T>
const gap_word_t gap_len_table_nl<T>::_len[bm::gap_levels] =
{ 32, 128, 512, bm::gap_max_buff_len };
/*!
@brief codes for supported SIMD optimizations
*/
enum simd_codes
{
simd_none = 0, ///!< No SIMD or any other optimization
simd_sse2 = 1, ///!< Intel SSE2
simd_sse42 = 2, ///!< Intel SSE4.2
simd_avx2 = 5, ///!< Intel AVX2
simd_avx512 = 6, ///!< Intel AVX512
simd_wasm128 = 7, ///! WASM SIMD 128
simd_neon = 8 ///!< ARM Neon
};
/*!
\brief Byte orders recognized by the library.
@internal
*/
enum ByteOrder
{
BigEndian = 0,
LittleEndian = 1
};
/**
Internal structure. Different global settings.
@internal
*/
template<bool T> struct globals
{
struct bo
{
ByteOrder _byte_order;
bo()
{
unsigned x;
unsigned char *s = (unsigned char *)&x;
s[0] = 1; s[1] = 2; s[2] = 3; s[3] = 4;
if(x == 0x04030201)
{
_byte_order = LittleEndian;
return;
}
if(x == 0x01020304)
{
_byte_order = BigEndian;
return;
}
_byte_order = LittleEndian;
}
};
static bo _bo;
static ByteOrder byte_order() { return _bo._byte_order; }
};
template<bool T> typename globals<T>::bo globals<T>::_bo;
} // namespace
#endif
BM_VERSION_PATCH
#define BM_VERSION_PATCH
Definition bmconst.h:247
BM_VERSION_MINOR
#define BM_VERSION_MINOR
Definition bmconst.h:246
BM_VERSION_MAJOR
#define BM_VERSION_MAJOR
Definition bmconst.h:245
bm::sort_order
sort_order
Sort order declaration.
Definition bmconst.h:204
bm::operation
operation
Bit operations.
Definition bmconst.h:191
bm::set_operation
set_operation
Codes of set operations.
Definition bmconst.h:168
bm::null_support
null_support
NULL-able value support.
Definition bmconst.h:229
bm::finalization
finalization
copy strategy
Definition bmconst.h:156
bm::strategy
strategy
Block allocation strategies.
Definition bmconst.h:146
bm::BM_UNSORTED
@ BM_UNSORTED
input set is NOT sorted
Definition bmconst.h:205
bm::BM_SORTED
@ BM_SORTED
input set is sorted (ascending order)
Definition bmconst.h:206
bm::BM_UNKNOWN
@ BM_UNKNOWN
sort order unknown
Definition bmconst.h:208
bm::BM_SORTED_UNIFORM
@ BM_SORTED_UNIFORM
sorted and in one block (internal!)
Definition bmconst.h:207
bm::BM_OR
@ BM_OR
Definition bmconst.h:193
bm::BM_SUB
@ BM_SUB
Definition bmconst.h:194
bm::BM_XOR
@ BM_XOR
Definition bmconst.h:195
bm::BM_AND
@ BM_AND
Definition bmconst.h:192
bm::set_COUNT_SUB_AB
@ set_COUNT_SUB_AB
Definition bmconst.h:178
bm::set_OR
@ set_OR
Definition bmconst.h:170
bm::set_COUNT_XOR
@ set_COUNT_XOR
Definition bmconst.h:176
bm::set_COUNT_OR
@ set_COUNT_OR
Definition bmconst.h:177
bm::set_COUNT_B
@ set_COUNT_B
Definition bmconst.h:181
bm::set_COUNT_SUB_BA
@ set_COUNT_SUB_BA
Definition bmconst.h:179
bm::set_ASSIGN
@ set_ASSIGN
Definition bmconst.h:173
bm::set_SUB
@ set_SUB
Definition bmconst.h:171
bm::set_COUNT_AND
@ set_COUNT_AND
Definition bmconst.h:175
bm::set_COUNT
@ set_COUNT
Definition bmconst.h:174
bm::set_AND
@ set_AND
Definition bmconst.h:169
bm::set_XOR
@ set_XOR
Definition bmconst.h:172
bm::set_COUNT_A
@ set_COUNT_A
Definition bmconst.h:180
bm::set_END
@ set_END
Definition bmconst.h:183
bm::use_null
@ use_null
support "non-assigned" or "NULL" logic
Definition bmconst.h:230
bm::no_null
@ no_null
do not support NULL values
Definition bmconst.h:231
bm::finalization::UNDEFINED
@ UNDEFINED
Definition bmconst.h:157
bm::finalization::READWRITE
@ READWRITE
mutable (read-write object)
Definition bmconst.h:159
bm::finalization::READONLY
@ READONLY
immutable (read-only object)
Definition bmconst.h:158
bm::BM_BIT
@ BM_BIT
No GAP compression strategy. All new blocks are bit blocks.
Definition bmconst.h:147
bm::BM_GAP
@ BM_GAP
GAP compression is ON.
Definition bmconst.h:148
bm
Definition bm.h:78
bm::set_array_mask
const unsigned set_array_mask
Definition bmconst.h:97
bm::set_block_plane_cnt
const unsigned set_block_plane_cnt
Definition bmconst.h:64
bm::all_bits_mask
const id64_t all_bits_mask
Definition bmconst.h:132
bm::set_block_digest_wave_size
const unsigned set_block_digest_wave_size
Definition bmconst.h:67
bm::id_max
const unsigned id_max
Definition bmconst.h:109
bm::gap_max_level
const unsigned gap_max_level
Definition bmconst.h:86
bm::word_t
unsigned int word_t
Definition bmconst.h:39
bm::set_block_mask
const unsigned set_block_mask
Definition bmconst.h:57
bm::set_total_blocks32
const unsigned set_total_blocks32
Definition bmconst.h:99
bm::set_blkblk_mask
const unsigned set_blkblk_mask
Definition bmconst.h:58
bm::set_sub_array_size
const unsigned set_sub_array_size
Definition bmconst.h:95
bm::gap_max_bits_cmrz
const unsigned gap_max_bits_cmrz
Definition bmconst.h:84
bm::id_max32
const unsigned id_max32
Definition bmconst.h:50
bm::bits_in_array
const unsigned bits_in_array
Definition bmconst.h:115
bm::set_total_blocks
const unsigned set_total_blocks
Definition bmconst.h:111
bm::ByteOrder
ByteOrder
Byte orders recognized by the library.
Definition bmconst.h:452
bm::LittleEndian
@ LittleEndian
Definition bmconst.h:454
bm::BigEndian
@ BigEndian
Definition bmconst.h:453
bm::set_representation
set_representation
set representation variants
Definition bmconst.h:217
bm::set_bitset
@ set_bitset
Simple bitset.
Definition bmconst.h:218
bm::set_gap
@ set_gap
GAP-RLE compression.
Definition bmconst.h:219
bm::set_array1
@ set_array1
array of set 1 values
Definition bmconst.h:220
bm::set_array0
@ set_array0
array of 0 values
Definition bmconst.h:221
bm::bie_cut_off
const unsigned bie_cut_off
Definition bmconst.h:88
bm::simd_codes
simd_codes
codes for supported SIMD optimizations
Definition bmconst.h:436
bm::simd_sse42
@ simd_sse42
!< Intel SSE2
Definition bmconst.h:439
bm::simd_sse2
@ simd_sse2
!< No SIMD or any other optimization
Definition bmconst.h:438
bm::simd_none
@ simd_none
Definition bmconst.h:437
bm::simd_avx512
@ simd_avx512
!< Intel AVX2
Definition bmconst.h:441
bm::simd_neon
@ simd_neon
! WASM SIMD 128
Definition bmconst.h:443
bm::simd_avx2
@ simd_avx2
!< Intel SSE4.2
Definition bmconst.h:440
bm::simd_wasm128
@ simd_wasm128
!< Intel AVX512
Definition bmconst.h:442
bm::set_block_size_op
const unsigned set_block_size_op
Definition bmconst.h:133
bm::rs3_half_span
const unsigned rs3_half_span
Definition bmconst.h:121
bm::gap_levels
const unsigned gap_levels
Definition bmconst.h:85
bm::set_word_shift
const unsigned set_word_shift
Definition bmconst.h:72
bm::set_array_size32
const unsigned set_array_size32
Definition bmconst.h:94
bm::set_sub_total_bits
const unsigned set_sub_total_bits
Definition bmconst.h:100
bm::set_block_digest_pos_shift
const unsigned set_block_digest_pos_shift
Definition bmconst.h:68
bm::set_block_size
const unsigned set_block_size
Definition bmconst.h:55
bm::id64_t
unsigned long long int id64_t
Definition bmconst.h:35
bm::block_waves
const unsigned block_waves
Definition bmconst.h:66
bm::gap_equiv_len
const unsigned gap_equiv_len
Definition bmconst.h:82
bm::set_block_alloc_size
const unsigned set_block_alloc_size
Definition bmconst.h:61
bm::rs3_border0_1
const unsigned rs3_border0_1
Definition bmconst.h:122
bm::id_t
unsigned int id_t
Definition bmconst.h:38
bm::gap_max_buff_len
const unsigned gap_max_buff_len
Definition bmconst.h:80
bm::rs3_border1
const unsigned rs3_border1
Definition bmconst.h:120
bm::set_array_shift
const unsigned set_array_shift
Definition bmconst.h:96
bm::gap_word_t
unsigned short gap_word_t
Definition bmconst.h:78
bm::rs3_border1_1
const unsigned rs3_border1_1
Definition bmconst.h:123
bm::set_block_plane_size
const unsigned set_block_plane_size
Definition bmconst.h:63
bm::rs3_border0
const unsigned rs3_border0
Definition bmconst.h:119
bm::gap_max_bits
const unsigned gap_max_bits
Definition bmconst.h:81
bm::set_top_array_size
const unsigned set_top_array_size
Definition bmconst.h:110
bm::set_block_shift
const unsigned set_block_shift
Definition bmconst.h:56
bm::set_word_mask
const unsigned set_word_mask
Definition bmconst.h:73
bm::short_t
unsigned short short_t
Definition bmconst.h:40
bm::bits_in_block
const unsigned bits_in_block
Definition bmconst.h:114
bm::wordop_t
id64_t wordop_t
Definition bmconst.h:131
bm::DeBruijn_bit_position
DeBruijn majic table.
Definition bmconst.h:262
bm::DeBruijn_bit_position::_multiply
static const unsigned _multiply[32]
Definition bmconst.h:263
bm::_copyright
Internal structure.
Definition bmconst.h:240
bm::_copyright::_v
static const unsigned _v[3]
MAJOR.MINOR.PATCH version components.
Definition bmconst.h:242
bm::_copyright::_p
static const char _p[]
Version as a text.
Definition bmconst.h:241
bm::bit_count_table
Structure to aid in counting bits table contains count of bits in 0-255 diapason of numbers.
Definition bmconst.h:309
bm::bit_count_table::_count
static const unsigned char _count[256]
Definition bmconst.h:310
bm::block_set_table
Structure keeps all-left/right ON bits masks.
Definition bmconst.h:364
bm::block_set_table::_right
static const unsigned _right[32]
Definition bmconst.h:366
bm::block_set_table::_left
static const unsigned _left[32]
Definition bmconst.h:365
bm::first_bit_table
Structure keeps index of first right 1 bit for every byte.
Definition bmconst.h:277
bm::first_bit_table::_idx
static const signed char _idx[256]
Definition bmconst.h:278
bm::gap_len_table_min
Alternative GAP lengths table. Good for for memory saver mode and very sparse bitsets.
Definition bmconst.h:411
bm::gap_len_table_min::_len
static const gap_word_t _len[bm::gap_levels]
Definition bmconst.h:412
bm::gap_len_table_nl
Non-linear size growth GAP lengths table.
Definition bmconst.h:424
bm::gap_len_table_nl::_len
static const gap_word_t _len[bm::gap_levels]
Definition bmconst.h:425
bm::gap_len_table
Default GAP lengths table.
Definition bmconst.h:396
bm::gap_len_table::_len
static const gap_word_t _len[bm::gap_levels]
Definition bmconst.h:397
bm::globals::bo
Definition bmconst.h:464
bm::globals::bo::_byte_order
ByteOrder _byte_order
Definition bmconst.h:465
bm::globals::bo::bo
bo()
Definition bmconst.h:467
bm::globals
Internal structure.
Definition bmconst.h:462
bm::globals::byte_order
static ByteOrder byte_order()
Definition bmconst.h:487
bm::globals::_bo
static bo _bo
Definition bmconst.h:486
bm::lzcnt_table
Structure for LZCNT constants (4-bit).
Definition bmconst.h:331
bm::lzcnt_table::_lut
static unsigned char const _lut[16]
Definition bmconst.h:332
bm::tzcnt_table
Structure for TZCNT constants.
Definition bmconst.h:346
bm::tzcnt_table::_lut
static unsigned char const _lut[37]
Definition bmconst.h:347