Bit functions implement different opereations on bit blocks (internals) and serve as a minimal building blocks.
◆ best_representation() bm::set_representation bm::best_representation ( unsigned bit_count, unsigned total_possible_bitcount, unsigned gap_count, unsigned block_size ) inlinenoexcept ◆ bit_andnot_arr_ffmask() ◆ bit_block_and() [1/2] ◆ bit_block_and() [2/2] ◆ bit_block_and_2way()digest based bit-block AND
dst = src1 AND src2
Definition at line 7824 of file bmfunc.h.
References BM_ASSERT, bm::bmi_blsi_u64(), bm::bmi_bslr_u64(), BMRESTRICT, mask, bm::set_block_digest_wave_size, t, VECT_AND_DIGEST_2WAY, and bm::word_bitcount64().
Referenced by bm::bvector< Alloc >::combine_operation_block_and(), bm::aggregator< BV >::process_bit_blocks_and(), and TestBlockAND().
◆ bit_block_and_3way() ◆ bit_block_and_5way() ◆ bit_block_and_any() ◆ bit_block_and_count() ◆ bit_block_and_or_2way() ◆ bit_block_any_range() ◆ bit_block_calc_change() ◆ bit_block_calc_count_range()template<bool LWA = false, bool RWA = false>
Function calculates number of 1 bits in the given array of words in the range between left anf right bits (borders included) Make sure the addr is aligned.
LWA - left word aligned RWA - right word aligned
Definition at line 6138 of file bmfunc.h.
References _mm_popcnt_u64(), BM_ASSERT, count, bm::gap_max_bits, bm::mask_l_u32(), bm::mask_r_u32(), bm::set_word_mask, bm::set_word_shift, and bm::word_bitcount().
Referenced by BitForEachRangeFuncTest(), BitRangeAllSetTest(), bm::bvector< Alloc >::block_count_to(), bm::bvector< Alloc >::build_rs_index(), bm::bvector< Alloc >::count_range_no_check(), bm::gap_bitset_and_count(), bm::gap_bitset_or_count(), bm::gap_bitset_sub_count(), bm::gap_bitset_xor_count(), GAPCheck(), and SelectTest().
◆ bit_block_calc_count_to()Function calculates number of 1 bits in the given array of words in the range between 0 anf right bits (borders included) Make sure the addr is aligned.
Definition at line 6224 of file bmfunc.h.
References BM_ASSERT, BM_AVX2_BIT_COUNT, BM_AVX2_POPCNT_PROLOG, cnt, count, bm::mask_l_u32(), bm::word_bitcount(), and bm::word_bitcount64().
Referenced by bm::bvector< Alloc >::block_count_to(), bm::bvector< Alloc >::build_rs_index(), bm::bvector< Alloc >::count_to_test(), and SelectTest().
◆ bit_block_convert_to_arr()template<typename T >
unsigned bm::bit_block_convert_to_arr ( T * dest, const unsigned * src, bool inverted ) noexceptConvert bit block into an array of ints corresponding to 1 bits.
Convert bit block into an array of ints corresponding to 1 bits
Definition at line 9812 of file bmfunc.h.
References bm::bmi_blsi_u64(), bm::bmi_bslr_u64(), BMRESTRICT, bm::gap_max_bits, t, T, and bm::word_bitcount64().
Referenced by bm::serializer< BV >::bienc_arr_bit_block(), bm::bit_out< TEncoder >::encode_array(), bm::serializer< BV >::encode_bit_array(), bm::serializer< BV >::gamma_arr_bit_block(), bm::random_subset< BV >::get_block_subset(), bm::random_subset< BV >::get_subset(), bm::serializer< BV >::interpolated_arr_bit_block(), and bm::serializer< BV >::interpolated_arr_bit_block_v3s().
◆ bit_block_copy()Bitblock copy operation.
Definition at line 7525 of file bmfunc.h.
References bm::set_block_size, and VECT_COPY_BLOCK.
Referenced by bm::blocks_manager< Alloc >::clone_assign_block(), bm::bvector< Alloc >::combine_operation_block_and(), bm::bvector< Alloc >::combine_operation_block_and_or(), bm::bvector< Alloc >::combine_operation_block_or(), bm::bvector< Alloc >::combine_operation_block_xor(), bm::bvector< Alloc >::combine_operation_with_block(), bm::aggregator< BV >::combine_shift_right_and(), bm::blocks_manager< Alloc >::copy(), bm::blocks_manager< Alloc >::copy_bit_block(), bm::blocks_manager< Alloc >::copy_block(), bm::blocks_manager< Alloc >::copy_to_arena(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_ASSIGN(), bm::random_subset< BV >::get_subset(), bm::aggregator< BV >::process_bit_blocks_and(), and bm::aggregator< BV >::process_bit_blocks_or().
◆ bit_block_copy_unalign() ◆ bit_block_count() [1/2]Bitcount for bit block.
Function calculates number of 1 bits in the given array of words. Make sure the addresses are aligned.
Definition at line 5799 of file bmfunc.h.
References bm::bit_count_min_unroll(), bm::set_block_size, and VECT_BITCOUNT.
Referenced by bm::bit_block_change_bc(), bm::bit_operation_or_count(), bm::bit_operation_sub_count(), bm::bit_operation_xor_count(), BitSplitTest(), bm::blocks_manager< Alloc >::block_bitcount(), BlockBitEraseTest(), bm::aggregator< BV >::combine_and_sub(), bm::combine_count_operation_with_block(), bm::aggregator< BV >::combine_shift_right_and(), bm::compute_wdr_params(), bm::bit_in< TDecoder >::decode_array(), bm::bit_out< TEncoder >::encode_array(), bm::serializer< BV >::find_bit_best_encoding(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_A(), bm::print_stat(), TestArrMin0(), and bm::tmatrix_distance().
◆ bit_block_count() [2/2]Bitcount for bit block.
Function calculates number of 1 bits in the given array of words. uses digest to understand zero areas
Definition at line 5818 of file bmfunc.h.
References bm::bitcount64_4way(), BM_ASSERT, bm::bmi_blsi_u64(), bm::bmi_bslr_u64(), BMRESTRICT, count, bm::set_block_digest_wave_size, t, VECT_BIT_COUNT_DIGEST, bm::word_bitcount(), and bm::word_bitcount64().
◆ bit_block_erase() void bm::bit_block_erase ( bm::word_t * block, unsigned bitpos, bool carry_over ) inlinenoexcept ◆ bit_block_find() unsigned bm::bit_block_find ( const bm::word_t * block, unsigned nbit, unsigned * pos ) inlinenoexcept ◆ bit_block_find_interval_end() bool bm::bit_block_find_interval_end ( const bm::word_t * block, unsigned nbit, unsigned * pos ) inlinenoexcept ◆ bit_block_find_interval_start() bool bm::bit_block_find_interval_start ( const bm::word_t * block, unsigned nbit, unsigned * pos ) inlinenoexcept ◆ bit_block_find_prev() ◆ bit_block_gather_scatter()template<typename TRGW , typename IDX , typename SZ >
void bm::bit_block_gather_scatter ( TRGW * arr, const bm::word_t * blk, const IDX * idx, SZ size, SZ start, unsigned bit_idx ) noexcept ◆ bit_block_init_and_2way() ◆ bit_block_insert() ◆ bit_block_is_all_one_range()Check if all bits are 1 in [left, right] range
Definition at line 6049 of file bmfunc.h.
References BM_ASSERT, bm::gap_max_bits, mask, bm::mask_l_u32(), bm::mask_r_u32(), bm::set_word_mask, and bm::set_word_shift.
Referenced by BitForEachRangeFuncTest(), BitRangeAllSetTest(), bm::block_is_all_one_range(), and bm::block_is_interval().
◆ bit_block_or()Plain bitblock OR operation. Function does not analyse availability of source and destination blocks.
Definition at line 8583 of file bmfunc.h.
References BMRESTRICT, bm::set_block_size, and VECT_OR_BLOCK.
Referenced by bm::bit_operation_or(), bm::bvector< Alloc >::combine_operation_block_and_or(), bm::bvector< Alloc >::combine_operation_block_or(), bm::deserializer< BV, DEC >::decode_bit_block(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_OR(), bm::aggregator< BV >::process_bit_blocks_or(), TestBlockOR(), and bm::deserializer< BV, DEC >::xor_decode().
◆ bit_block_or_2way() ◆ bit_block_or_3way() ◆ bit_block_or_5way() ◆ bit_block_or_any() ◆ bit_block_or_count() ◆ bit_block_rle_set()template<typename T >
void bm::bit_block_rle_set ( unsigned * blk, const T * s, const T * r, const T * rlen, unsigned s_cnt, unsigned r_cnt ) noexcept ◆ bit_block_rle_split()template<typename T >
void bm::bit_block_rle_split ( T * dst_s, T * dst_r, T * rlen, unsigned & s_cnt, unsigned & r_cnt, const unsigned * src, bool inverted ) noexceptConvert bit block into two arrays of ints( corresponding to 1 bits)
Definition at line 10008 of file bmfunc.h.
References bm::bmi_blsi_u64(), bm::bmi_bslr_u64(), BMRESTRICT, bm::gap_max_bits, int, prev(), t, T, and bm::word_bitcount64().
Referenced by BitSplitTest(), and bm::serializer< BV >::interpolated_arr_bit_block_v3().
◆ bit_block_rotate_left_1() void bm::bit_block_rotate_left_1 ( bm::word_t * block ) inlinenoexcept ◆ bit_block_rotate_left_1_unr() void bm::bit_block_rotate_left_1_unr ( bm::word_t * block ) inlinenoexcept ◆ bit_block_set()Bitblock memset operation.
Definition at line 5204 of file bmfunc.h.
References bm::set_block_size, rapidjson::value, and VECT_SET_BLOCK.
Referenced by BitForEachRangeFuncTest(), BitRangeAllSetTest(), BitSplitTest(), BlockBitEraseTest(), bm::blocks_manager< Alloc >::check_allocate_block(), bm::bvector< Alloc >::combine_operation_block_xor(), bm::aggregator< BV >::combine_shift_right_and(), bm::compute_wdr_params(), bm::bit_in< TDecoder >::decode_array(), bm::deserializer< BV, DEC >::decode_arrbit(), bm::deserializer< BV, DEC >::decode_bit_block(), bm::deserializer< BV, DEC >::decode_block_bit_interval(), bm::blocks_manager< Alloc >::deoptimize_block(), bm::blocks_manager< Alloc >::deoptimize_block_no_check(), bm::bit_out< TEncoder >::encode_array(), bm::gap_convert_to_bitset(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_arr_bit(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_AND(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_ASSIGN(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_AND(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_OR(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_SUB_AB(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_SUB_BA(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_XOR(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_SUB(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_XOR(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_inv_arr(), bm::random_subset< BV >::get_subset(), bm::blocks_manager< Alloc >::make_bit_block(), bm::aggregator< BV >::process_bit_blocks_or(), bm::aggregator< BV >::process_shift_right_and(), bm::deseriaizer_base< DEC, BLOCK_IDX >::read_0runs_block(), bm::deseriaizer_base< DEC, BLOCK_IDX >::read_bic_arr_inv(), TestArrMin0(), TestBlockDigest(), TestBlockExpandCompact(), and bm::gap_transpose_engine< GT, BT, BLOCK_SIZE >::transpose().
◆ bit_block_shift_l1()Left bit-shift bitblock by 1 bit (reference)
Definition at line 6484 of file bmfunc.h.
References BM_ASSERT, i, and bm::set_block_size.
◆ bit_block_shift_l1_unr() ◆ bit_block_shift_l1_unr_min()Left bit-shift bitblock by 1 bit (minimum unroll)
Definition at line 6515 of file bmfunc.h.
References i, and bm::set_block_size.
Referenced by bm::bit_block_shift_l1_unr().
◆ bit_block_shift_r1() ◆ bit_block_shift_r1_and() ◆ bit_block_shift_r1_and_unr() ◆ bit_block_shift_r1_unr() ◆ bit_block_shift_r1_unr_min() ◆ bit_block_stream() ◆ bit_block_stream_unalign() ◆ bit_block_sub() [1/2] ◆ bit_block_sub() [2/2] ◆ bit_block_sub_2way() ◆ bit_block_sub_3way() ◆ bit_block_sub_5way() ◆ bit_block_sub_any() ◆ bit_block_sub_count() ◆ bit_block_xor()Plain bitblock XOR operation. Function does not analyse availability of source and destination blocks.
Definition at line 9182 of file bmfunc.h.
References BM_ASSERT, BMRESTRICT, i, bm::set_block_size, and VECT_XOR_BLOCK.
Referenced by bm::xor_scanner< BV >::apply_xor_match_vector(), bm::bit_operation_xor(), Check_XOR_Product(), bm::bvector< Alloc >::combine_operation_block_xor(), bm::iterator_deserializer< BV, SerialIterator >::deserialize(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_XOR(), bm::xor_scanner< BV >::search_best_xor_mask(), bm::deserializer< BV, DEC >::xor_decode(), bm::deserializer< BV, DEC >::xor_decode_chain(), and bm::serializer< BV >::xor_tmp_product().
◆ bit_block_xor_2way() ◆ bit_block_xor_any() ◆ bit_block_xor_change32() ◆ bit_block_xor_change64() ◆ bit_block_xor_count() ◆ bit_count_change() ◆ bit_count_min_unroll() ◆ bit_count_nonzero_size()template<class T >
unsigned bm::bit_count_nonzero_size ( const T * blk, unsigned data_size ) noexcept ◆ bit_find_first() [1/2] ◆ bit_find_first() [2/2]BIT block find the first set bit.
Definition at line 9490 of file bmfunc.h.
References bm::bit_scan_forward32(), BM_ASSERT, i, bm::set_block_size, and VECT_BIT_FIND_FIRST.
Referenced by bm::block_find_first_diff(), bm::bvector< Alloc >::check_or_next(), bm::bvector< Alloc >::find(), bm::aggregator< BV >::find_first_and_sub(), TestBlockDigest(), TestFindBlockDiff(), and TestFindFirst().
◆ bit_find_first_diff() ◆ bit_find_first_if_1()BIT block find the first set bit if only 1 bit is set.
Definition at line 9586 of file bmfunc.h.
References _mm_load_si128(), _mm_test_all_zeros(), bm::bit_scan_forward32(), BM_ASSERT, bm::bmi_blsi_u64(), cnt, first(), i, bm::set_block_digest_wave_size, t, bm::word_bitcount(), and bm::word_bitcount64().
Referenced by bm::aggregator< BV >::process_bit_blocks_and(), bm::aggregator< BV >::process_bit_blocks_sub(), bm::aggregator< BV >::process_gap_blocks_and(), bm::aggregator< BV >::process_gap_blocks_sub(), and TestBlockDigest().
◆ bit_find_last() ◆ bit_find_rank()template<typename SIZE_TYPE >
◆ bit_for_each()template<typename T , typename F >
void bm::bit_for_each ( T w, F & func )Templated algorithm to unpacks word into list of ON bit indexes.
Definition at line 425 of file bmfunc.h.
Referenced by bm::bit_list().
◆ bit_for_each_4()template<typename T , typename F >
void bm::bit_for_each_4 ( T w, F & func )Templated algorithm to unpacks octet based word into list of ON bit indexes.
Definition at line 355 of file bmfunc.h.
References BM_ASSERT.
Referenced by bm::bit_list_4().
◆ bit_iblock_make_pcv()template<typename T , unsigned BPC, unsigned BPS>
void bm::bit_iblock_make_pcv ( const unsigned distance[BPC][BPC], unsigned char * pc_vector )!< ibpc limiter
Make a compression descriptor vector for bit-planes
pc_vector[] format: each element (pc_vector[i]) describes the plane compression: first 3 bits - compression code: 0 - plane uncompressed 1 - plane is ALL ZERO (000000...) 2 - plane is ALL ONE (111111...) 3 - plane is equal to another plane J (5 high bits (max 31)) 4 - plane is close (but not equal) to plane J next 5 bits - number of plane used as a XOR expression ( compression codes: 3,4 )
Definition at line 379 of file bmtrans.h.
References BM_ASSERT, i, bm::ibpc_all_one, bm::ibpc_all_zero, bm::ibpc_close, bm::ibpc_equiv, bm::ibpc_uncompr, and T.
Referenced by bm::gap_transpose_engine< GT, BT, BLOCK_SIZE >::compute_distance_matrix().
◆ bit_invert()template<typename T >
void bm::bit_invert ( T * start ) noexceptFunction inverts block of bits
Definition at line 6805 of file bmfunc.h.
References BM_ASSERT, IS_VALID_ADDR, bm::set_block_size, T, and VECT_INVERT_BLOCK.
Referenced by bm::blocks_manager< Alloc >::clone_assign_block(), bm::bvector< Alloc >::combine_operation_block_xor(), bm::deserializer< BV, DEC >::decode_bit_block(), bm::bvector< Alloc >::invert(), and bm::deseriaizer_base< DEC, BLOCK_IDX >::read_bic_arr_inv().
◆ bit_is_all_zero()Returns "true" if all bits in the block are 0.
Definition at line 1660 of file bmfunc.h.
References BMRESTRICT, bm::set_block_size, and VECT_IS_ZERO_BLOCK.
Referenced by bm::bit_operation_or_any(), bm::bit_operation_sub_any(), bm::bit_operation_xor_any(), bm::block_any(), bm::check_block_zero(), bm::combine_any_operation_with_block(), bm::bvector< Alloc >::combine_operation_block_and(), bm::bvector< Alloc >::combine_operation_block_sub(), bm::aggregator< BV >::combine_shift_right_and(), bm::bvector< Alloc >::compare(), bm::gap_bitset_or_any(), bm::blocks_manager< Alloc >::block_any_func::operator()(), bm::blocks_manager< Alloc >::opt_copy_bit_block(), bm::blocks_manager< Alloc >::optimize_block(), bm::aggregator< BV >::process_gap_blocks_and(), bm::aggregator< BV >::process_gap_blocks_sub(), TestBlockAND(), TestBlockSUB(), and TestBlockZero().
◆ bit_list()template<typename T , typename B >
unsigned bm::bit_list ( T w, B * bits ) noexcept ◆ bit_list_4()template<typename T , typename B >
unsigned bm::bit_list_4 ( T w, B * bits ) noexcept ◆ bit_operation_and() ◆ bit_operation_and_any() ◆ bit_operation_and_count() ◆ bit_operation_or() ◆ bit_operation_or_any() ◆ bit_operation_or_count() ◆ bit_operation_sub() ◆ bit_operation_sub_any() ◆ bit_operation_sub_count()Performs bitblock SUB operation and calculates bitcount of the result.
Definition at line 8423 of file bmfunc.h.
References bm::bit_block_count(), bm::bit_block_sub_count(), FULL_BLOCK_FAKE_ADDR, FULL_BLOCK_REAL_ADDR, bm::gap_max_bits, IS_EMPTY_BLOCK, and IS_FULL_BLOCK.
Referenced by bm::bit_operation_sub_count_inv(), bm::combine_count_operation_with_block(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_SUB_AB(), and bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_SUB_BA().
◆ bit_operation_sub_count_inv()Performs inverted bitblock SUB operation and calculates bitcount of the result.
Definition at line 8460 of file bmfunc.h.
References bm::bit_operation_sub_count().
◆ bit_operation_xor() ◆ bit_operation_xor_any() ◆ bit_operation_xor_count() ◆ bit_scan_reverse()template<class T >
unsigned bm::bit_scan_reverse ( T value ) noexceptReturns BSR value
Definition at line 454 of file bmutil.h.
References bm::bit_scan_reverse32(), BM_ASSERT, T, test, and rapidjson::value.
Referenced by bm::bit_find_last(), BitEncoderTest(), bm::gamma_size(), bm::sparse_vector< Val, BV >::insert_value_no_null(), Log2Test(), and bm::sparse_vector< Val, BV >::set_value_no_null().
◆ bitcmp()Lexicographical comparison of BIT buffers.
Definition at line 5448 of file bmfunc.h.
References BM_ASSERT, len, and T.
Referenced by bm::bvector< Alloc >::compare().
◆ bitcount64_4way() ◆ bitscan()template<typename V , typename B >
unsigned short bm::bitscan ( V w, B * bits ) noexceptTemplated Bitscan with dynamic dispatch for best type.
Definition at line 879 of file bmfunc.h.
References bm::bitscan_bsf(), bm::bitscan_bsf64(), bm::bitscan_popcnt(), bm::bitscan_popcnt64(), and rapidjson::value.
Referenced by bm::sparse_vector_scanner< bm::rsc_sparse_vector >::add_agg_char(), bm::sparse_vector_scanner< SV, S_FACTOR >::find_eq_with_nulls_horizontal(), bm::sparse_vector_scanner< SV, S_FACTOR >::find_gt_horizontal(), bm::for_each_bit_blk(), bm::sparse_vector< Val, BV >::import_u_nocheck(), bm::sparse_vector_scanner< SV, S_FACTOR >::prepare_and_sub_aggregator(), and bm::random_subset< BV >::process_word().
◆ bitscan_bsf()template<typename B >
unsigned short bm::bitscan_bsf ( unsigned w, B * bits ) noexcept ◆ bitscan_bsf64()template<typename B >
unsigned short bm::bitscan_bsf64 ( bm::id64_t w, B * bits ) noexcept ◆ bitscan_popcnt() [1/2]template<typename B >
unsigned short bm::bitscan_popcnt ( bm::id_t w, B * bits ) noexceptUnpacks word into list of ON bit indexes using popcnt method.
Definition at line 764 of file bmfunc.h.
References B, t, and bm::word_bitcount().
◆ bitscan_popcnt() [2/2]template<typename B >
unsigned short bm::bitscan_popcnt ( bm::id_t w, B * bits, unsigned short offs ) noexcept ◆ bitscan_popcnt64() [1/2]template<typename B >
unsigned short bm::bitscan_popcnt64 ( bm::id64_t w, B * bits ) noexcept ◆ bitscan_popcnt64() [2/2]template<typename B >
unsigned short bm::bitscan_popcnt64 ( bm::id64_t w, B * bits, unsigned short offs ) noexcept ◆ bitscan_wave() unsigned short bm::bitscan_wave ( const bm::word_t * w_ptr, unsigned char * bits ) inlinenoexcept ◆ block_compact_by_digest() ◆ block_expand_by_digest() ◆ block_init_digest0() ◆ calc_block_digest0()Compute digest for 64 non-zero areas.
Definition at line 1230 of file bmfunc.h.
References i, mask, bm::set_block_digest_wave_size, and VECT_IS_DIGEST_ZERO.
Referenced by bit_block_calc_xor_change_digest(), BlockBitEraseTest(), bm::bvector< Alloc >::combine_operation_block_and(), bm::xor_scanner< BV >::compute_xor_complexity_descr(), bm::serializer< BV >::find_bit_best_encoding(), bm::serializer< BV >::find_bit_best_encoding_l5(), bm::aggregator< BV >::process_bit_blocks_and(), bm::aggregator< BV >::process_shift_right_and(), bm::xor_scanner< BV >::search_best_xor_mask(), TestBlockAND(), TestBlockDigest(), and TestBlockExpandCompact().
◆ check_zero_digest() bool bm::check_zero_digest ( bm::id64_t digest, unsigned bitpos_from, unsigned bitpos_to ) inlinenoexcept ◆ clear_bit() void bm::clear_bit ( unsigned * dest, unsigned bitpos ) inlinenoexcept ◆ count_leading_zeros() unsigned bm::count_leading_zeros ( unsigned x ) inlinenoexcept ◆ count_trailing_zeros() unsigned bm::count_trailing_zeros ( unsigned v ) inlinenoexcept ◆ digest_mask() bm::id64_t bm::digest_mask ( unsigned from, unsigned to ) inlinenoexcept ◆ for_each_bit_blk() [1/2]template<typename Func , typename SIZE_TYPE >
for-each visitor, calls a visitor functor for each 1 bit group
Definition at line 1597 of file bmalgo_impl.h.
References bm::bitscan_wave(), BM_ASSERT, cnt, bm::gap_max_bits, IS_FULL_BLOCK, offset, bm::set_bitscan_wave_size, and bm::set_block_size.
Referenced by BitForEachRangeFuncTest(), bm::aggregator< BV >::combine_and_sub(), bm::for_each_bit_block_range(), and bm::for_each_bit_range_no_check().
◆ for_each_bit_blk() [2/2]template<typename Func , typename SIZE_TYPE >
for-each range visitor, calls a visitor functor for each 1 bit group
Definition at line 1637 of file bmalgo_impl.h.
References bm::bits_in_block, bm::bitscan(), bm::bitscan_wave(), BM_ASSERT, cnt, IS_FULL_BLOCK, mask, bm::mask_l_u32(), bm::mask_r_u32(), offset, bm::set_bitscan_wave_size, bm::set_word_mask, and bm::set_word_shift.
◆ is_bits_one() ◆ or_bit_block() void bm::or_bit_block ( unsigned * dest, unsigned bitpos, unsigned bitcount ) inlinenoexcept ◆ set_bit() void bm::set_bit ( unsigned * dest, unsigned bitpos ) inlinenoexceptSet 1 bit in a block.
Definition at line 658 of file bmfunc.h.
References bm::set_block_mask, bm::set_word_mask, and bm::set_word_shift.
Referenced by CJobStatusTracker::AddPendingJob(), bm::arr_calc_delta_min_w(), bm::bit_block_rle_set(), CNcbi2naRandomizer::CNcbi2naRandomizer(), bm::deserializer< BV, DEC >::decode_arrbit(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_arr_bit(), bm::random_subset< BV >::get_random_array(), bm::deseriaizer_base< DEC, BLOCK_IDX >::read_bic_arr(), TestBlockExpandCompact(), and TestFindBlockDiff().
◆ sub_bit_block() void bm::sub_bit_block ( unsigned * dest, unsigned bitpos, unsigned bitcount ) inlinenoexcept ◆ test_bit() unsigned bm::test_bit ( const unsigned * block, unsigned bitpos ) inlinenoexcept ◆ tmatrix_distance()template<typename T , unsigned BPC, unsigned BPS>
void bm::tmatrix_distance ( const T tmatrix[BPC][BPS], unsigned distance[BPC][BPC] )Compute pairwise Row x Row Humming distances on planes(rows) of the transposed bit block.
Definition at line 315 of file bmtrans.h.
References bm::bit_block_count(), count, i, r1, r2, r3, T, and bm::word_bitcount().
Referenced by BitBlockTransposeTest(), bm::gap_transpose_engine< GT, BT, BLOCK_SIZE >::compute_distance_matrix(), and DNACompressionTest().
◆ update_block_digest0() ◆ widx_to_digest_mask() bm::id64_t bm::widx_to_digest_mask ( unsigned w_idx ) inlinenoexcept ◆ word_bitcount()Returns bit count
Definition at line 583 of file bmutil.h.
References _mm_popcnt_u32().
Referenced by bm::sparse_vector_scanner< bm::rsc_sparse_vector >::add_agg_char(), bm::bit_block_and_count(), bm::bit_block_calc_count_range(), bm::bit_block_calc_count_to(), bm::bit_block_change32(), bm::bit_block_count(), bm::bit_block_or_count(), bm::bit_block_sub_count(), bm::bit_block_xor_change32(), bm::bit_block_xor_count(), bm::bit_count_change(), bm::bit_count_min_unroll(), bm::bit_find_first_if_1(), bm::bit_find_rank(), bm::bitscan_popcnt(), bm::bvector< Alloc >::enumerator::decode_bit_group(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_AND(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_OR(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_SUB_AB(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_SUB_BA(), bm::serial_stream_iterator< DEC, BLOCK_IDX >::get_bit_block_COUNT_XOR(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::import_char_slice(), bm::bit_COUNT< W >::operator()(), bm::bit_COUNT_AND< W >::operator()(), bm::bit_COUNT_XOR< W >::operator()(), bm::bit_COUNT_OR< W >::operator()(), bm::bit_COUNT_SUB_AB< W >::operator()(), bm::bit_COUNT_SUB_BA< W >::operator()(), bm::bit_COUNT_A< W >::operator()(), bm::bit_COUNT_B< W >::operator()(), bm::random_subset< BV >::process_word(), SelectTest(), bm::sse2_bit_block_calc_count_change(), sx_CalcByteBitCount(), bm::tmatrix_distance(), bm::word_bitcount64(), bm::word_select32_bitscan_popcnt(), and bm::word_select32_bitscan_tz().
◆ word_bitcount64()Function calculates number of 1 bits in 64-bit word.
Definition at line 606 of file bmutil.h.
References _mm_popcnt_u32(), _mm_popcnt_u64(), and bm::word_bitcount().
Referenced by bm::bit_block_and(), bm::bit_block_and_2way(), bm::bit_block_and_3way(), bm::bit_block_and_5way(), bm::bit_block_and_or_2way(), bm::bit_block_calc_count_to(), bm::bit_block_change64(), bm::bit_block_convert_to_arr(), bm::bit_block_count(), bm::bit_block_rle_split(), bm::bit_block_shift_r1_and(), bm::bit_block_sub(), bm::bit_block_sub_2way(), bm::bit_block_sub_3way(), bm::bit_block_sub_5way(), bm::bit_block_xor(), bm::bit_block_xor_change64(), bm::bit_find_first(), bm::bit_find_first_if_1(), bm::bit_find_rank(), bm::bitscan_popcnt64(), bm::block_compact_by_digest(), bm::aggregator< BV >::combine_and_sub(), bm::bvector< Alloc >::combine_operation_block_and(), bm::bvector< Alloc >::enumerator::decode_bit_group(), bm::serializer< BV >::encode_bit_digest(), bm::serializer< BV >::find_bit_best_encoding(), bm::serializer< BV >::find_bit_best_encoding_l5(), bm::aggregator< BV >::process_bit_blocks_and(), bm::aggregator< BV >::process_bit_blocks_sub(), bm::aggregator< BV >::process_gap_blocks_and(), bm::aggregator< BV >::process_gap_blocks_sub(), bm::deseriaizer_base< DEC, BLOCK_IDX >::read_digest0_block(), SelectTest(), bm::sse2_bit_block_xor_2way(), TestBlockAND(), TestBlockDigest(), bm::update_block_digest0(), bm::word_select64_bitscan_popcnt(), and bm::word_select64_bitscan_tz().
◆ word_select32() unsigned bm::word_select32 ( unsigned w, unsigned rank ) inlinenoexcept ◆ word_select32_bitscan_popcnt() unsigned bm::word_select32_bitscan_popcnt ( unsigned w, unsigned rank ) inlinenoexcept ◆ word_select32_bitscan_tz() unsigned bm::word_select32_bitscan_tz ( unsigned w, unsigned rank ) inlinenoexcept ◆ word_select64() unsigned bm::word_select64 ( bm::id64_t w, unsigned rank ) inlinenoexcept ◆ word_select64_bitscan_popcnt() unsigned bm::word_select64_bitscan_popcnt ( bm::id64_t w, unsigned rank ) inlinenoexcept ◆ word_select64_bitscan_tz() unsigned bm::word_select64_bitscan_tz ( bm::id64_t w, unsigned rank ) inlinenoexcept ◆ word_select64_linear() unsigned bm::word_select64_linear ( bm::id64_t w, unsigned rank ) inlinenoexcept ◆ wordcmp()template<typename T >
int bm::wordcmp ( T a, T b ) noexceptLexicographical comparison of two words as bit strings. Auxiliary implementation for testing and reference purposes.
Definition at line 1642 of file bmfunc.h.
Referenced by WordCmpTest().
◆ wordcmp0()template<typename T >
int bm::wordcmp0 ( T w1, T w2 ) noexceptLexicographical comparison of two words as bit strings (reference) Auxiliary implementation for testing and reference purposes.
Definition at line 1613 of file bmfunc.h.
Referenced by WordCmpTest().
◆ xor_bit_block() void bm::xor_bit_block ( unsigned * dest, unsigned bitpos, unsigned bitcount ) inlinenoexceptRetroSearch 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