<
classBV,
classFunc>
205 typedef typenameBV::size_type size_type;
207 const typenameBV::blocks_manager_type& bman = bv.get_blocks_manager();
208 bm::word_t*** blk_root = bman.top_blocks_root();
213 unsignedtsize = bman.top_block_size();
214 for(
unsigned i= 0;
i< tsize; ++
i)
237 #elif defined(BM64_SSE4) 265 template<
classBV,
classFunc>
267 typenameBV::size_type left,
268 typenameBV::size_type right,
305 for(
unsigned i= 0;
i<
size; ++
i)
340 typedef typenameBV::size_type size_type;
342func(handle_ptr, callback_ptr);
363 typenameBV::size_type left,
364 typenameBV::size_type right,
368 typedef typenameBV::size_type size_type;
370func(handle_ptr, callback_ptr);
393 template<
typenameBV,
typenamePairVect>
395 typenameBV::size_type rank,
399 typenameBV::size_type
first,
last, pos;
400 boolfound = bv.find_range(
first,
last);
408target_v.push_back(pv);
415found = bv.find_rank(rank,
first, pos);
418pv.first =
first; pv.second = pos;
419target_v.push_back(pv);
430target_v.push_back(pv);
451 template<
typenameBV>
467 void decompress(BV& bv_target,
constBV& bv_idx,
constBV& bv_src);
477 void compress(BV& bv_target,
constBV& bv_idx,
constBV& bv_src);
504 if(&bv_idx == &bv_src)
512 typedef typenameBV::enumerator enumerator_t;
513enumerator_t en_s = bv_src.first();
514enumerator_t en_i = bv_idx.first();
519 for(; en_i.valid(); )
523 i= *en_i; s = *en_s;
530ibuffer[b_size++] = r_idx++;
531 if(b_size == n_buffer_cap)
544 size_typer_dist = bv_idx.count_range(
i+ 1, s);
551 for(; s >
i; ++r_idx)
577 if(&bv_idx == &bv_src)
588 typedef typenameBV::enumerator enumerator_t;
589enumerator_t en_s = bv_src.first();
590enumerator_t en_i = bv_idx.first();
591 for(; en_i.valid(); )
599ibuffer[b_size++] =
i;
600 if(b_size == n_buffer_cap)
605++en_i; ++en_s; ++r_idx;
615en_i.skip(s - r_idx);
621bv_idx.find_rank(rank,
i, new_pos);
628ibuffer[b_size++] = new_pos;
629 if(b_size == n_buffer_cap)
634++en_i; ++en_s; ++r_idx;
659: bv_target_(bv_out),
664 intadd_bits(
size_typearr_offset,
const unsigned char* bits,
unsignedbits_size)
666 for(
unsigned i= 0;
i< bits_size; ++
i)
671 size_typer_idx = bv_index_.count_to(idx, bc_index_) - 1;
672bv_target_.set_bit_no_check(r_idx);
683 size_typer_idx = bv_index_.count_to(idx, bc_index_) - 1;
684bv_target_.set_bit_no_check(r_idx);
698 if(&bv_idx == &bv_src)
703visitor_func func(bv_target, bv_idx, bc_idx);
#define FULL_BLOCK_FAKE_ADDR
#define FULL_SUB_BLOCK_REAL_ADDR
Bit manipulation primitives (internal)
Algorithms for rank compression of bit-vector.
void decompress(BV &bv_target, const BV &bv_idx, const BV &bv_src)
Rank decompression.
void compress_by_source(BV &bv_target, const BV &bv_idx, const rs_index_type &bc_idx, const BV &bv_src)
Source vector priority + index based rank.
void compress(BV &bv_target, const BV &bv_idx, const BV &bv_src)
Rank compression algorithm based on two palallel iterators/enumerators set of source vector gets re-m...
BV::rs_index_type rs_index_type
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
bool avx2_test_all_zero_wave(const void *ptr)
check if wave of pointers is all NULL
bool sse42_test_all_zero_wave(const void *ptr) noexcept
check if wave of pointers is all NULL
int(* bit_visitor_callback_type)(void *handle_ptr, bm::id_t bit_idx)
Callback type to visit (callback style) bits in bit-vector(s)
@ BM_SORTED
input set is sorted (ascending order)
void distance_operation(const BV &bv1, const BV &bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end) noexcept
Distance computing template function.
BV::size_type distance_and_operation(const BV &bv1, const BV &bv2) noexcept
Distance AND computing template function.
void distance_operation_any(const BV &bv1, const BV &bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end) noexcept
Distance screening template function.
@ COUNT_XOR
(A ^ B).count()
@ COUNT_SUB_AB
(A - B).count()
@ COUNT_AND
(A & B).count()
@ COUNT_OR
(A | B).count()
void rank_range_split(const BV &bv, typename BV::size_type rank, PairVect &target_v)
Algorithm to identify bit-vector ranges (splits) for the rank.
BV::size_type count_and(const BV &bv1, const BV &bv2) noexcept
Computes bitcount of AND operation of two bitsets.
int visit_each_bit(const BV &bv, void *handle_ptr, bit_visitor_callback_type callback_ptr)
bvector visitor scanner to traverse each 1 bit using C callback
int visit_each_bit_range(const BV &bv, typename BV::size_type left, typename BV::size_type right, void *handle_ptr, bit_visitor_callback_type callback_ptr)
bvector visitor scanner to traverse each bits in range (C callback)
bm::distance_metric_descriptor::size_type count_xor(const BV &bv1, const BV &bv2) noexcept
Computes bitcount of XOR operation of two bitsets.
BV::size_type count_sub(const BV &bv1, const BV &bv2) noexcept
Computes bitcount of SUB operation of two bitsets.
BV::size_type any_and(const BV &bv1, const BV &bv2) noexcept
Computes if there is any bit in AND operation of two bitsets.
int for_each_bit_range(const BV &bv, typename BV::size_type left, typename BV::size_type right, Func &bit_functor)
bit-vector range visitor to traverse each 1 bit
int for_each_bit(const BV &bv, Func &bit_functor)
bit-vector visitor scanner to traverse each 1 bit using C++ visitor
BV::size_type any_xor(const BV &bv1, const BV &bv2) noexcept
Computes if there is any bit in XOR operation of two bitsets.
BV::size_type any_or(const BV &bv1, const BV &bv2) noexcept
Computes if there is any bit in OR operation of two bitsets.
BV::size_type count_or(const BV &bv1, const BV &bv2) noexcept
Computes bitcount of OR operation of two bitsets.
BV::size_type any_sub(const BV &bv1, const BV &bv2) noexcept
Computes if there is any bit in SUB operation of two bitsets.
void xor_swap(W &x, W &y) noexcept
XOR swap two variables.
int for_each_bit_range_no_check(const BV &bv, typename BV::size_type left, typename BV::size_type right, Func &bit_functor)
Implementation of for_each_bit_range without boilerplave checks.
const unsigned set_sub_array_size
double value_type
The numeric datatype used by the parser.
const struct ncbi::grid::netcache::search::fields::SIZE size
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
functor-adaptor for C-style callbacks
Functor for bit-copy (for testing)
bit_vistor_copy_functor(BV &bv)
bit_visitor_callback_type func_
int add_bits(size_type offset, const unsigned char *bits, unsigned size)
int add_range(size_type offset, size_type size)
Distance metric descriptor, holds metric code and result.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4