1 #ifndef BMBMATRIX__H__INCLUDED__
2 #define BMBMATRIX__H__INCLUDED__
26 #include <type_traits>
328 template<
typename Val,
typename BVect,
unsigned MAX_SIZE>
350 template<
typename Val,
typename BV,
unsigned MAX_SIZE>
593 typename bvector_type::optmode opt_mode = bvector_type::opt_compress,
594 typename bvector_type::statistics* stat = 0);
713 #pragma warning( push )
714 #pragma warning( disable : 4146 )
717 template<
typename BV>
723 : bv_size_(bv_max_size),
733 template<
typename BV>
741 template<
typename BV>
743 : bv_size_(bbm.bv_size_),
753 template<
typename BV>
755 : bv_size_(bbm.bv_size_),
760 is_dynamic_ = bbm.is_dynamic_;
765 template<
typename BV>
775 template<
typename BV>
785 template<
typename BV>
795 template<
typename BV>
800 null_idx_ = null_idx;
805 template<
typename BV>
828 bv_rows_[
i] = bv ? construct_bvector(bv) : 0;
835 template<
typename BV>
839 size_type r_to = (!erase_null && null_idx_) ? null_idx_ : rsize_;
847 template<
typename BV>
853 bv->insert(idx,
false);
858 template<
typename BV>
864 bv->clear_bit_no_check(idx);
869 template<
typename BV>
874 bv->swap(idx1, idx2);
879 template<
typename BV>
883 if (rsize <= rsize_prev)
893 ::memset(&bv_rows_[0], 0, rsize *
sizeof(bv_rows_[0]));
897 bv_rows_[
i] = bv_rows_prev[
i];
898 alloc_.free_ptr(bv_rows_prev,
unsigned(rsize_prev));
901 bv_rows_[rsize-1] = bv_rows_[null_idx_];
902 bv_rows_[null_idx_] = 0;
911 template<
typename BV>
915 size_type osize = (7 + rows_not_null()) / 8;
922 template<
typename BV>
929 destruct_bvector(bv);
934 alloc_.free_ptr(bv_rows_,
unsigned(rsize_));
940 template<
typename BV>
946 if (rsize_ != bbm.rsize_)
948 if (null_idx_ != bbm.null_idx_)
954 if (
bool(bv) !=
bool(bv_arg))
964 template<
typename BV>
967 if (pool_ != pool_ptr)
971 bv->set_allocator_pool(pool_ptr);
979 template<
typename BV>
984 auto i = rows_not_null();
985 for (--
i;
i > 0; --
i)
998 template<
typename BV>
1011 template<
typename BV>
1023 template<
typename BV>
1032 alloc_ = bbm.alloc_;
1033 bbm.alloc_ = alloc_tmp;
1041 bbm.pool_ = pool_tmp;
1047 bv_rows_ = bbm.bv_rows_;
1048 bbm.bv_rows_ = rtmp;
1053 template<
typename BV>
1060 allocate_rows(rsize_ + 8);
1065 bv = bv_rows_[
row] = construct_bvector(0);
1071 template<
typename BV>
1076 allocate_rows(
row + 8);
1082 bv = bv_rows_[
row] = construct_bvector(&bv_src);
1089 template<
typename BV>
1095 destruct_bvector(bv);
1102 template<
typename BV>
1110 destruct_bvector(bv);
1120 template<
typename BV>
1129 BM_THROW(
false, BM_ERR_BADALLOC);
1135 rbv =
new(mem)
bvector_type(ap_.strat, ap_.glevel_len, bv_size_, alloc_);
1143 rbv =
new bvector_type(ap_.strat, ap_.glevel_len, bv_size_, alloc_);
1148 rbv->set_allocator_pool(pool_);
1154 template<
typename BV>
1167 template<
typename BV>
1173 return bv->get_blocks_manager().get_block_ptr(
i, j);
1179 template<
typename BV>
1181 unsigned slice_from,
unsigned slice_until,
1184 for (
unsigned p = slice_from; p < slice_until; ++p)
1186 bv->clear_bit_no_check(idx);
1192 template<
typename BV>
1195 unsigned char octet)
1197 if (7u + octet_idx * 8u > rsize_)
1198 allocate_rows(rsize_ + 16);
1202 for (;
row < row_end; ++
row)
1208 bv = this->construct_row(
row);
1209 bv->set_bit_no_check(pos);
1214 bv->clear_bit_no_check(pos);
1222 if (row_end > rsize_)
1226 bv->clear_bit_no_check(pos);
1231 template<
typename BV>
1234 unsigned char octet)
1241 for (;
row < row_end; ++
row)
1248 bv = this->construct_row(
row);
1249 bv->set_bit_no_check(pos);
1253 bv->insert(pos,
true);
1259 bv->insert(pos,
false);
1267 if (row_end > rsize_)
1271 bv->insert(pos,
false);
1282 b1 = (blka[0] == FBADDR);
1283 b2 = (blka[1] == FBADDR);
1284 b1 |= (blka[2] == FBADDR);
1285 b2 |= (blka[3] == FBADDR);
1286 b1 |= (blka[4] == FBADDR);
1287 b2 |= (blka[5] == FBADDR);
1288 b1 |= (blka[6] == FBADDR);
1289 b2 |= (blka[7] == FBADDR);
1293 template<
typename BV>
1304 unsigned row_idx = unsigned(octet_idx * 8);
1305 if (row_idx + 7 >= rsize_ ||
1306 (null_idx_ && (row_idx + 7 > null_idx_)))
1307 return (
unsigned char)v;
1309 blka[0] = get_block(row_idx+0, i0, j0);
1310 blka[1] = get_block(row_idx+1, i0, j0);
1311 blka[2] = get_block(row_idx+2, i0, j0);
1312 blka[3] = get_block(row_idx+3, i0, j0);
1313 blka[4] = get_block(row_idx+4, i0, j0);
1314 blka[5] = get_block(row_idx+5, i0, j0);
1315 blka[6] = get_block(row_idx+6, i0, j0);
1316 blka[7] = get_block(row_idx+7, i0, j0);
1329 if (
const bm::word_t* blk; (blk = blka[0])!=0)
1332 v |= (unsigned)
bool(is_set);
1334 if (
const bm::word_t* blk;(blk = blka[1])!=0)
1337 v |= unsigned(
bool(is_set)) << 1u;
1339 if (
const bm::word_t* blk;(blk = blka[2])!=0)
1342 v |= unsigned(
bool(is_set)) << 2u;
1344 if (
const bm::word_t* blk;(blk = blka[3])!=0)
1347 v |= unsigned(
bool(is_set)) << 3u;
1349 if (
const bm::word_t* blk;(blk = blka[4])!=0)
1352 v |= unsigned(
bool(is_set)) << 4u;
1354 if (
const bm::word_t* blk;(blk = blka[5])!=0)
1357 v |= unsigned(
bool(is_set)) << 5u;
1359 if (
const bm::word_t* blk;(blk = blka[6])!=0)
1362 v |= unsigned(
bool(is_set)) << 6u;
1364 if (
const bm::word_t* blk;(blk = blka[7])!=0)
1367 v |= unsigned(
bool(is_set)) << 7u;
1369 return (
unsigned char)v;
1373 if ((blk = blka[0])!=0)
1379 v |= (unsigned)
bool(is_set);
1381 if ((blk = blka[1])!=0)
1387 v |= unsigned(
bool(is_set)) << 1u;
1389 if ((blk = blka[2])!=0)
1395 v |= unsigned(
bool(is_set)) << 2u;
1397 if ((blk = blka[3])!=0)
1403 v |= unsigned(
bool(is_set)) << 3u;
1406 if ((blk = blka[4])!=0)
1412 v |= unsigned(
bool(is_set)) << 4u;
1414 if ((blk = blka[5])!=0)
1420 v |= unsigned(
bool(is_set)) << 5u;
1422 if ((blk = blka[6])!=0)
1428 v |= unsigned(
bool(is_set)) << 6u;
1430 if ((blk = blka[7])!=0)
1436 v |= unsigned(
bool(is_set)) << 7u;
1439 return (
unsigned char)v;
1444 template<
typename BV>
1449 char value = char(get_octet(pos, octet_idx));
1482 template<
typename BV>
1496 blka[0] = get_block(row_idx+0, i0, j0);
1497 blka[1] = get_block(row_idx+1, i0, j0);
1498 blka[2] = get_block(row_idx+2, i0, j0);
1499 blka[3] = get_block(row_idx+3, i0, j0);
1509 if (!
test_4gaps(blka[0], blka[1], blka[2], blka[3]))
1511 if (
test_4bits(blka[0], blka[1], blka[2], blka[3]))
1513 v = unsigned(
bool((blka[0][nword] & mask0))) |
1514 unsigned(
bool((blka[1][nword] & mask0)) << 1u) |
1515 unsigned(
bool((blka[2][nword] & mask0)) << 2u) |
1516 unsigned(
bool((blka[3][nword] & mask0)) << 3u);
1524 if ((blk = blka[
i])!=0)
1530 v |= unsigned(
bool(is_set)) <<
i;
1532 if ((blk = blka[++
i])!=0)
1538 v |= unsigned(
bool(is_set)) <<
i;
1546 template<
typename BV>
1548 typename bvector_type::optmode opt_mode,
1549 typename bvector_type::statistics*
st)
1558 for (
unsigned k = 0; k < rsize_; ++k)
1562 typename bvector_type::statistics stbv;
1564 bv->optimize(temp_block, opt_mode,
st ? &stbv : 0);
1573 template<
typename BV>
1576 for (
unsigned k = 0; k < rsize_; ++k)
1583 template<
typename BV>
1590 typename bvector_type::statistics stbv;
1591 bv->calc_stat(&stbv);
1595 st.max_serialize_mem += 8;
1600 template<
typename BV>
1602 typename BV::optmode opt_mode)
1604 for (
unsigned k = 0; k < rsize_; ++k)
1610 typename bvector_type::blocks_manager_type& bman =
1611 bv->get_blocks_manager();
1612 bman.optimize_bit_block(
i, j, opt_mode);
1624 template<
class Val,
class BV,
unsigned MAX_SIZE>
1631 template<
class Val,
class BV,
unsigned MAX_SIZE>
1638 : bmatr_(sv_slices, is_dynamic, ap, bv_max_size, alloc)
1642 size_type null_idx = (MAX_SIZE *
sizeof(Val) * 8);
1651 template<
class Val,
class BV,
unsigned MAX_SIZE>
1654 : bmatr_(bsv.bmatr_),
1655 slice_mask_(bsv.slice_mask_),
1657 effective_slices_(bsv.effective_slices_)
1662 template<
class Val,
class BV,
unsigned MAX_SIZE>
1680 if (
i && (
i == arg_null_idx))
1685 bv->set_range(0, size_-1);
1704 template<
class Val,
class BV,
unsigned MAX_SIZE>
1710 if (rows < arg_rows)
1720 bv_null_arg = bmatr.
get_row(null_idx);
1725 bv_null->merge(*bv_null_arg);
1727 if (rows > arg_rows)
1729 for (
unsigned j = 0; j < rows; ++j)
1732 if (arg_bv && arg_bv != bv_null_arg)
1743 template<
class Val,
class BV,
unsigned MAX_SIZE>
1749 bmatr_.
swap(bsv.bmatr_);
1752 bm::xor_swap(effective_slices_, bsv.effective_slices_);
1758 template<
class Val,
class BV,
unsigned MAX_SIZE>
1761 auto slices = bmatr_.
rows();
1767 slice_mask_ = 0; size_ = 0;
1769 bv_null->clear(
true);
1775 template<
class Val,
class BV,
unsigned MAX_SIZE>
1782 return clear_range(right, left, set_null);
1783 auto planes = bmatr_.
rows();
1785 for (
unsigned i = 0;
i < planes; ++
i)
1789 bv->clear_range_no_check(left, right);
1791 if (set_null && bv_null)
1792 bv_null->clear_range_no_check(left, right);
1797 template<
class Val,
class BV,
unsigned MAX_SIZE>
1803 this->clear_range(0, left-1, (slice_null ==
bm::use_null));
1806 this->clear_range(right + 1, sz, (slice_null ==
bm::use_null));
1811 template<
class Val,
class BV,
unsigned MAX_SIZE>
1822 clear_range(sz, this->size_, set_null);
1829 template<
class Val,
class BV,
unsigned MAX_SIZE>
1834 return (bv_null) ? (!bv_null->test(idx)) :
false;
1839 template<
class Val,
class BV,
unsigned MAX_SIZE>
1844 bv_null->insert(idx, not_null);
1849 template<
class Val,
class BV,
unsigned MAX_SIZE>
1861 if (
i > effective_slices_)
1862 effective_slices_ =
i;
1869 template<
class Val,
class BV,
unsigned MAX_SIZE>
1875 const unsigned planes =
sizeof(
value_type) * 8;
1877 unsigned slice_size = (element_idx+1) * planes;
1878 if (slice_size > this->bmatr_.
rows())
1879 slice_size = (
unsigned) this->bmatr_.
rows();
1880 for (
unsigned i = element_idx * planes;
i < slice_size; ++
i, ++bidx)
1881 mask |= get_slice(
i) ? (mask1 << bidx) : 0ull;
1887 template<
class Val,
class BV,
unsigned MAX_SIZE>
1889 typename bvector_type::optmode opt_mode,
1890 typename bvector_type::statistics*
st)
1892 typename bvector_type::statistics stbv;
1893 bmatr_.
optimize(temp_block, opt_mode, &stbv);
1898 unsigned slices = (unsigned)this->bmatr_.
rows();
1899 for (
unsigned j = 0; j < slices; ++j)
1902 if (bv && (bv != bv_null))
1917 template<
class Val,
class BV,
unsigned MAX_SIZE>
1919 typename bvector_type::statistics*
st)
const BMNOEXCEPT
1923 size_type slices = this->get_bmatrix().rows();
1927 st->max_serialize_mem += 1 + 1 + 1 + 1 + 8 + (8 * slices);
1928 st->max_serialize_mem += 1 + 8;
1933 template<
class Val,
class BV,
unsigned MAX_SIZE>
1942 template<
class Val,
class BV,
unsigned MAX_SIZE>
1951 template<
class Val,
class BV,
unsigned MAX_SIZE>
1960 template<
class Val,
class BV,
unsigned MAX_SIZE>
1965 if (
size_type arg_size = sv.size(); this->size_ != arg_size)
1968 unsigned slices = (unsigned) this->bmatr_.
rows();
1969 unsigned arg_slices = (unsigned) sv.bmatr_.rows();
1970 unsigned max_slices(slices);
1971 if (max_slices < arg_slices)
1972 max_slices = arg_slices;
1974 const bvector_type* bv_null = this->get_null_bvector();
1975 const bvector_type* bv_null_arg = sv.get_null_bvector();
1977 for (
unsigned j = 0; j < max_slices; ++j)
1982 bv = (j < slices) ? this->bmatr_.
get_row(j) : 0;
1983 arg_bv = (j < arg_slices) ? sv.bmatr_.get_row(j) : 0;
1986 if (arg_bv == bv_null_arg)
2005 bool eq = bv->equal(*arg_bv);
2013 if (bv_null == bv_null_arg)
2015 if (!bv_null || !bv_null_arg)
2020 bool eq = bv_null->equal(*bv_null_arg);
2029 template<
class Val,
class BV,
unsigned MAX_SIZE>
2032 unsigned slices = (unsigned) this->bmatr_.
rows();
2033 for (
unsigned j = 0; j < slices; ++j)
2048 template<
class Val,
class BV,
unsigned MAX_SIZE>
2062 spli = this->bmatr_.
rows();
2064 bv_null->copy_range(*bv_null_arg, left, right);
2068 spli = this->bmatr_.
rows();
2074 if (arg_bv == bv_null_arg)
2076 bvector_type* bv = this->get_create_slice(
unsigned(j));
2077 bv->copy_range(*arg_bv, left, right);
2085 template<
class Val,
class BV,
unsigned MAX_SIZE>
2089 if constexpr (is_signed())
2106 template<
class Val,
class BV,
unsigned MAX_SIZE>
2110 if constexpr (is_signed())
2123 #pragma warning( pop )
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
#define BM_DECLARE_TEMP_BLOCK(x)
Constants, lookup tables and typedefs.
#define FULL_BLOCK_FAKE_ADDR
Utilities for bit transposition (internal) (experimental!)
Base class for bit-transposed(bit-sliced) sparse vector construction.
allocator_pool_type * get_allocator_pool() const noexcept
Get allocation pool.
void freeze_matr()
Turn on RO mode.
void clear_all(bool free_mem=true) noexcept
resize to zero, free memory
bm::id64_t get_slice_mask(unsigned element_idx) const noexcept
void resize(size_type new_size, bool set_null)
unsigned_value_type slice_mask_
slice presence bit-mask
const bvector_type * bvector_type_const_ptr
void merge_matr(bmatrix_type &bmatr)
Merge plane bvectors from an outside base matrix Note: outside base matrix gets destroyed.
const bmatrix_type & get_bmatrix() const noexcept
bvector_type * bvector_type_ptr
const value_type & const_reference
void copy_from(const base_sparse_vector< Val, BV, MAX_SIZE > &bsv)
bool empty() const noexcept
bvector_type_ptr slice(unsigned i) noexcept
get access to bit-plane as is (can return NULL)
bvector_type_const_ptr slice(unsigned i) const noexcept
bvector_type::allocation_policy allocation_policy_type
void clear_range(size_type left, size_type right, bool set_null)
bvector_type_ptr get_create_slice(unsigned i)
get access to bit-plain, function checks and creates a plane
static constexpr unsigned value_bits() noexcept
Number of total bit-planes in the value type.
static unsigned slices() noexcept
get total number of bit-planes in the vector
static value_type u2s(unsigned_value_type v) noexcept
Convert unsigned value type to signed representation.
size_type size() const noexcept
void sync_ro() noexcept
Sybc read-only state.
base_sparse_vector(const base_sparse_vector< Val, BV, MAX_SIZE > &bsv)
unsigned effective_slices() const noexcept
Number of effective bit-planes in the value type.
bool is_nullable() const noexcept
check if container supports NULL(unassigned) values
void free_slice(unsigned i)
free memory in bit-plane
void optimize_block(block_idx_type nb, typename BV::optmode opt_mode)
plane index for the "NOT NULL" flags plane
bool is_null(size_type idx) const noexcept
test if specified element is NULL
unsigned effective_slices_
number of bit slices actually allocated
void calc_stat(typename bvector_type::statistics *st) const noexcept
Calculates memory statistics.
bvector_type_const_ptr get_slice(unsigned i) const noexcept
get read-only access to bit-plane
bmatrix_type bmatr_
bit-transposed matrix
void erase_column(size_type idx, bool erase_null)
allocator_type::allocator_pool_type allocator_pool_type
base_sparse_vector(bm::null_support null_able, bool is_dynamic, allocation_policy_type ap=allocation_policy_type(), size_type bv_max_size=bm::id_max, const allocator_type &alloc=allocator_type())
void swap_elements(size_type idx1, size_type idx2)
swap two vector elements
void swap(base_sparse_vector< Val, BV, MAX_SIZE > &bsv) noexcept
bmatrix_type & get_bmatrix() noexcept
access to internal bit-matrix
static unsigned_value_type s2u(value_type v) noexcept
Convert signed value type to unsigned representation.
void copy_range_slices(const base_sparse_vector< Val, BV, MAX_SIZE > &bsv, typename base_sparse_vector< Val, BV, MAX_SIZE >::size_type left, typename base_sparse_vector< Val, BV, MAX_SIZE >::size_type right, bm::null_support slice_null)
Perform copy_range() on a set of planes.
void set_allocator_pool(allocator_pool_type *pool_ptr) noexcept
Set allocation pool.
size_type size_
array size
void bit_and_rows(const bvector_type &bv)
Set AND (intersect) operation on all existing bit-slices.
bool equal(const base_sparse_vector< Val, BV, MAX_SIZE > &sv, bm::null_support null_able=bm::use_null) const noexcept
check if another sparse vector has the same content and size
void keep_range_no_check(size_type left, size_type right, bm::null_support slice_null)
std::make_unsigned< value_type >::type unsigned_value_type
bvector_type::enumerator bvector_enumerator_type
void bit_sub_rows(const bvector_type &bv, bool use_null)
Set SUB (MINUS) operation on all existing bit-slices.
bm::basic_bmatrix< BV > bmatrix_type
static constexpr bool is_signed() noexcept
returns true if value type is signed integral type
static unsigned stored_slices() noexcept
Number of stored bit-planes (value planes + extra.
const bvector_type * get_null_bvector() const noexcept
Get bit-vector of assigned values or NULL (if not constructed that way)
bm::null_support get_null_support() const noexcept
check if container supports NULL (unassigned) values
base_sparse_vector(base_sparse_vector< Val, BV, MAX_SIZE > &&bsv) noexcept
bvector_type * get_null_bvect() noexcept
BV::allocator_type allocator_type
void optimize(bm::word_t *temp_block=0, typename bvector_type::optmode opt_mode=bvector_type::opt_compress, typename bvector_type::statistics *stat=0)
run memory optimization for all bit-vector rows
void insert_null(size_type idx, bool not_null)
void clear_value_planes_from(unsigned plane_idx, size_type idx)
void mark_null_idx(unsigned null_idx) noexcept
Set NULL plain index.
void insert_clear_value_planes_from(unsigned plane_idx, size_type idx)
bvector_type::block_idx_type block_idx_type
Basic dense bit-matrix class.
void insert_octet(size_type pos, size_type octet_idx, unsigned char octet)
void insert_column(size_type idx, size_type row_from)
allocator_pool_type * get_allocator_pool() const noexcept
unsigned char get_octet(size_type pos, size_type octet_idx) const noexcept
bvector_type::block_idx_type block_idx_type
basic_bmatrix< BV > & operator=(const basic_bmatrix< BV > &bbm)
int compare_octet(size_type pos, size_type octet_idx, char octet) const noexcept
bool is_same_structure(const basic_bmatrix< BV > &bbm) const noexcept
Debugging function to check if two matrixes have the same rows created.
void set_allocator_pool(allocator_pool_type *pool_ptr) noexcept
bvector_type * bvector_type_ptr
bvector_type_ptr * bv_rows_
void swap_columns(size_type idx1, size_type idx2)
bool is_dynamic_
if rsize is dynamic (variable length)
void swap(basic_bmatrix< BV > &bbm) noexcept
unsigned get_half_octet(size_type pos, size_type row_idx) const noexcept
bvector_type_ptr construct_row(size_type row)
void set_null_idx(size_type null_idx) noexcept
set index of the NULL vector
const bvector_type * row(size_type i) const noexcept
void calc_stat(typename bvector_type::statistics &st, size_type rsize) const noexcept
size_type rows_not_null() const noexcept
BV::allocator_type allocator_type
bvector_type::allocation_policy allocation_policy_type
size_type null_idx_
Index of the NULL row.
allocator_type::allocator_pool_type allocator_pool_type
void destruct_row(size_type row)
const bvector_type * bvector_type_const_ptr
bvector_type * construct_bvector(const bvector_type *bv) const
const bm::word_t * get_block(size_type p, unsigned i, unsigned j) const noexcept
Get low level internal access to.
void bit_and_rows(const bvector_type &bv)
Set AND (intersect) operation on all existing rows.
allocator_pool_type * pool_
void free_rows() noexcept
Free all rows.
void copy_from(const basic_bmatrix< BV > &bbm)
static void throw_bad_alloc()
void optimize(bm::word_t *temp_block=0, typename bvector_type::optmode opt_mode=bvector_type::opt_compress, typename bvector_type::statistics *stat=0)
run memory optimization for all bit-vector rows
void clear_slices_range(unsigned slice_from, unsigned slize_until, size_type idx)
Clear bit-planes bit.
~basic_bmatrix() noexcept
bvector_type * get_row(size_type i) noexcept
void clear_column(size_type idx, size_type row_from)
void clear_row(size_type row, bool free_mem)
void allocate_rows(size_type rsize)
allocate matrix rows of bit-vectors (new rows are NULLs)
void optimize_block(block_idx_type nb, typename BV::optmode opt_mode)
size_type calc_effective_rows_not_null() const noexcept
allocation_policy_type ap_
bvector_type_const_ptr get_row(size_type i) const noexcept
void destruct_bvector(bvector_type *bv) const
size_type octet_size() const noexcept
void set_octet(size_type pos, size_type octet_idx, unsigned char octet)
bool is_dynamic() const noexcept
Return if matrix is dynamic resizable.
void erase_column(size_type idx, bool erase_null)
basic_bmatrix(basic_bmatrix< BV > &&bbm) noexcept
size_type get_null_idx() const noexcept
return index of the NULL vector
basic_bmatrix(size_type rsize, bool is_dynamic=true, allocation_policy_type ap=allocation_policy_type(), size_type bv_max_size=bm::id_max, const allocator_type &alloc=allocator_type())
void bit_sub_rows(const bvector_type &bv, bool use_null)
Set SUB (MINUS) operation on all existing rows.
size_type rows() const noexcept
bvector_type::size_type size_type
bvector_size_type size_type
blocks_manager_type::block_idx_type block_idx_type
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
null_support
NULL-able value support.
@ use_null
support "non-assigned" or "NULL" logic
@ no_null
do not support NULL values
unsigned gap_test_unr(const T *buf, const unsigned pos) noexcept
Tests if bit = pos is true. Analog of bm::gap_test with SIMD unrolling.
bool test_4gaps(const bm::word_t *p0, const bm::word_t *p1, const bm::word_t *p2, const bm::word_t *p3) noexcept
Test 4 pointers are all marked as GAPs.
void xor_swap(W &x, W &y) noexcept
XOR swap two variables.
const unsigned set_block_mask
void get_block_coord(BI_TYPE nb, unsigned &i, unsigned &j) noexcept
Recalc linear bvector block index into 2D matrix coordinates.
bool check_any_fullb(const bm::word_t *blka[8], const bm::word_t *FBADDR)
const unsigned set_word_shift
unsigned long long int id64_t
const unsigned set_block_shift
const unsigned set_word_mask
bool test_4bits(const bm::word_t *p0, const bm::word_t *p1, const bm::word_t *p2, const bm::word_t *p3) noexcept
Test 4 pointers are not NULL and not marked as FULLBLOCK.
double value_type
The numeric datatype used by the parser.
const struct ncbi::grid::netcache::search::fields::SIZE size
void resize(vector< SMethodDef > &container)
const GenericPointer< typename T::ValueType > T2 value
bool eq(T x_, T y_, T round_)
static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)