BitMagic-C++
Macros
bmdef.h File Reference

Definitions(internal) More...

#include <climits>
#include <cassert>
Include dependency graph for bmdef.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BM_x86
 
#define BMNOEXEPT   noexcept
 
#define BMREGISTER
 
#define BM_ASSERT   assert
 
#define FULL_BLOCK_REAL_ADDR   bm::all_set<true>::_block._p
 
#define FULL_BLOCK_FAKE_ADDR   bm::all_set<true>::_block._p_fullp
 
#define BLOCK_ADDR_SAN(addr)   (addr == FULL_BLOCK_FAKE_ADDR) ? FULL_BLOCK_REAL_ADDR : addr
 
#define IS_VALID_ADDR(addr)   bm::all_set<true>::is_valid_block_addr(addr)
 
#define IS_FULL_BLOCK(addr)   bm::all_set<true>::is_full_block(addr)
 
#define IS_EMPTY_BLOCK(addr)   bool(addr == 0)
 
#define BM_BLOCK_TYPE(addr)   bm::all_set<true>::block_type(addr)
 
#define BMPTR_SETBIT0(ptr)   ( ((bm::id64_t)ptr) | 1 )
 
#define BMPTR_CLEARBIT0(ptr)   ( ((bm::id64_t)ptr) & ~(bm::id64_t)1 )
 
#define BMPTR_TESTBIT0(ptr)   ( ((bm::id64_t)ptr) & 1 )
 
#define BMGAP_PTR(ptr)   ((bm::gap_word_t*)BMPTR_CLEARBIT0(ptr))
 
#define BMSET_PTRGAP(ptr)   ptr = (bm::word_t*)BMPTR_SETBIT0(ptr)
 
#define BM_IS_GAP(ptr)   bool(BMPTR_TESTBIT0(ptr)!=0)
 
#define BMRESTRICT
 
#define BMFORCEINLINE   inline
 
#define BM64_SSE4
 
#define BM_SET_MMX_GUARD
 
#define BM_ALIGN16
 
#define BM_ALIGN16ATTR   __attribute__((aligned(16)))
 
#define BM_ALIGN32
 
#define BM_ALIGN32ATTR   __attribute__((aligned(32)))
 
#define BM_ALIGN64
 
#define BM_ALIGN64ATTR   __attribute__((aligned(64)))
 
#define BM_VECT_ALIGN   BM_ALIGN16
 
#define BM_VECT_ALIGN_ATTR   BM_ALIGN16ATTR
 
#define BM_INCWORD_BITCOUNT(cnt, w)   cnt += unsigned(_mm_popcnt_u32(w));
 
#define BM_ASSERT_THROW(x, xerrcode)
 

Detailed Description

Definitions(internal)

Definition in file bmdef.h.

Macro Definition Documentation

◆ BLOCK_ADDR_SAN

#define BLOCK_ADDR_SAN (   addr)    (addr == FULL_BLOCK_FAKE_ADDR) ? FULL_BLOCK_REAL_ADDR : addr

◆ BM64_SSE4

#define BM64_SSE4

Definition at line 201 of file bmdef.h.

◆ BM_ALIGN16

#define BM_ALIGN16

◆ BM_ALIGN16ATTR

#define BM_ALIGN16ATTR   __attribute__((aligned(16)))

◆ BM_ALIGN32

#define BM_ALIGN32

Definition at line 278 of file bmdef.h.

◆ BM_ALIGN32ATTR

#define BM_ALIGN32ATTR   __attribute__((aligned(32)))

Definition at line 279 of file bmdef.h.

◆ BM_ALIGN64

#define BM_ALIGN64

Definition at line 283 of file bmdef.h.

◆ BM_ALIGN64ATTR

#define BM_ALIGN64ATTR   __attribute__((aligned(64)))

Definition at line 284 of file bmdef.h.

◆ BM_ASSERT

#define BM_ASSERT   assert

Definition at line 116 of file bmdef.h.

Referenced by bm::aggregator< bvector_type >::add(), bm::sparse_vector< Val, BV >::back_insert_iterator::add_value(), bm::mem_alloc< BA, PA, APool >::alloc_gap_block(), bm::basic_bmatrix< bm::bvector<> >::allocate_rows(), bm::bvector< Alloc >::mem_pool_guard::assign_if_not_set(), bm::sparse_vector< Val, BV >::back_insert_iterator::back_insert_iterator(), bm::bit_block_and(), bm::bit_block_and_2way(), bm::bit_block_and_5way(), bm::bit_block_any_range(), bm::bit_block_calc_count_range(), bm::bit_block_calc_count_to(), bm::bit_block_shift_r1(), bm::bit_block_shift_r1_and(), bm::bit_block_shift_r1_and_unr(), bm::bit_block_shift_r1_unr(), bm::bit_block_sub(), bm::bit_block_to_gap(), bm::bit_count_nonzero_size(), bm::bit_find_first(), bm::bit_find_first_if_1(), bm::bit_find_last(), bm::bit_find_rank(), bm::bit_for_each_4(), bm::bit_iblock_make_pcv(), bm::bit_iblock_pcv_stat(), bm::bit_iblock_reduce(), bm::bit_operation_and(), bm::bit_operation_or(), bm::bit_operation_sub(), bm::bit_operation_xor(), bm::bit_scan_forward32(), bm::bit_scan_reverse(), bm::bit_scan_reverse32(), bm::bitcmp(), bm::block_ptr_array_range(), bm::block_range_scan(), bm::globals< T >::bo::bo(), bm::rsc_sparse_vector< Val, SV >::calc_stat(), bm::compressed_buffer_collection< BV >::calc_stat(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::calc_stat(), bm::base_sparse_vector< Val, BV, 1 >::calc_stat(), bm::sparse_vector< unsigned, bm::bvector<> >::calc_stat(), bm::bvector<>::calc_stat(), bm::check_zero_digest(), bm::aggregator< bvector_type >::combine_and(), bm::aggregator< bvector_type >::combine_and_horizontal(), bm::combine_and_sorted(), bm::aggregator< bvector_type >::combine_and_sub(), bm::aggregator< bvector_type >::combine_and_sub_horizontal(), bm::combine_any_operation_with_block(), bm::combine_count_operation_with_block(), bm::bvector<>::combine_operation(), bm::aggregator< bvector_type >::combine_or(), bm::combine_or(), bm::aggregator< bvector_type >::combine_or_horizontal(), bm::aggregator< bvector_type >::combine_shift_right_and(), bm::combine_sub(), bm::combine_xor(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::compare(), bm::rank_compressor< bvector_type >::compress(), bm::rank_compressor< bvector_type >::compress_by_source(), bm::sparse_vector< Val, BV >::const_iterator::const_iterator(), bm::basic_bmatrix< bm::bvector<> >::construct_row(), bm::bvector<>::copy_range(), bm::bvector<>::count_range(), bm::bvector<>::count_to(), bm::bvector<>::count_to_test(), bm::rsc_sparse_vector< Val, SV >::decode(), bm::rank_compressor< bvector_type >::decompress(), bm::sparse_vector_scanner< SV >::decompress(), bm::sparse_vector_deserializer< SV >::deserialize(), bm::compressed_collection_deserializer< CBC >::deserialize(), bm::deserializer< typename SV::bvector_type, bm::decoder >::deserialize(), bm::iterator_deserializer< BV, SerialIterator >::deserialize(), bm::operation_deserializer< BV >::deserialize(), bm::deserialize(), bm::deserializer< typename SV::bvector_type, bm::decoder >::deserialize_gap(), bm::basic_bmatrix< bm::bvector<> >::destruct_row(), bm::dynamic_range_clip_high(), bm::dynamic_range_clip_low(), bm::serializer< bvector_type >::encode_bit_interval(), bm::serializer< bvector_type >::encode_gap_block(), bm::compressed_collection< serializer< BV >::buffer, BV >::equal(), bm::base_sparse_vector< Val, BV, 1 >::equal(), bm::export_array(), bm::aggregator< bvector_type >::find_effective_sub_block_size(), bm::sparse_vector_scanner< SV >::find_eq(), bm::sparse_vector_scanner< SV >::find_eq_with_nulls_horizontal(), bm::aggregator< bvector_type >::find_first_and_sub(), bm::sparse_vector_scanner< SV >::find_first_eq(), bm::bvector<>::find_range(), bm::rsc_sparse_vector< Val, SV >::find_rank(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::find_rank(), bm::sparse_vector< unsigned, bm::bvector<> >::find_rank(), bm::bvector<>::find_rank(), bm::bvector< Alloc >::bulk_insert_iterator::flush(), bm::alloc_pool< BA, PA >::free_bit_block(), bm::mem_alloc< BA, PA, APool >::free_bit_block(), bm::mem_alloc< BA, PA, APool >::free_gap_block(), bm::bit_out< TEncoder >::gamma(), bm::gap_2_bitblock(), bm::gap_add_to_bitset(), bm::gap_add_value(), bm::gap_and_to_bitset(), bm::gap_bfind(), bm::gap_bit_count_range(), bm::gap_bit_count_to(), bm::gap_bit_count_unr(), bm::gap_bitset_and_any(), bm::gap_bitset_and_count(), bm::gap_bitset_or_count(), bm::gap_bitset_sub_any(), bm::gap_bitset_sub_count(), bm::gap_bitset_xor_any(), bm::gap_bitset_xor_count(), bm::gap_calc_level(), bm::gap_control_sum(), bm::gap_find_first(), bm::gap_find_in_block(), bm::gap_find_last(), bm::gap_find_rank(), bm::gap_init_range_block(), bm::gap_overhead(), bm::gap_set_all(), bm::gap_set_value(), bm::gap_sub_to_bitset(), bm::gap_test(), bm::gap_test_unr(), bm::gap_xor_to_bitset(), bm::sparse_vector< unsigned, bm::bvector<> >::gather(), bm::bit_grabber< T, BPC >::get(), bm::bvps_addr_resolver< bvector_type >::get(), bm::sparse_vector< unsigned, bm::bvector<> >::get(), bm::serial_stream_iterator< DEC >::get_arr_bit(), bm::serial_stream_iterator< DEC >::get_bit(), bm::bvector<>::get_bit(), bm::serial_stream_iterator< DEC >::get_bit_block(), bm::serial_stream_iterator< DEC >::get_bit_block_AND(), bm::serial_stream_iterator< DEC >::get_bit_block_ASSIGN(), bm::serial_stream_iterator< DEC >::get_bit_block_COUNT(), bm::serial_stream_iterator< DEC >::get_bit_block_COUNT_A(), bm::serial_stream_iterator< DEC >::get_bit_block_COUNT_AND(), bm::serial_stream_iterator< DEC >::get_bit_block_COUNT_OR(), bm::serial_stream_iterator< DEC >::get_bit_block_COUNT_SUB_AB(), bm::serial_stream_iterator< DEC >::get_bit_block_COUNT_SUB_BA(), bm::serial_stream_iterator< DEC >::get_bit_block_COUNT_XOR(), bm::serial_stream_iterator< DEC >::get_bit_block_OR(), bm::serial_stream_iterator< DEC >::get_bit_block_SUB(), bm::serial_stream_iterator< DEC >::get_bit_block_XOR(), bm::bit_in< TDecoder >::get_bits(), bm::serial_stream_iterator< DEC >::get_gap_block(), bm::basic_bmatrix< bm::bvector<> >::get_row(), bm::bvector< Alloc >::enumerator::go_first(), bm::bvector< Alloc >::enumerator::go_to(), bm::bvector< Alloc >::enumerator::go_up(), bm::idx_arr_block_lookup(), bm::bvector<>::import(), bm::improve_gap_levels(), bm::bvector<>::inc(), bm::rsc_sparse_vector< Val, SV >::is_null(), bm::rsc_sparse_vector< Val, SV >::load_from(), bm::rsc_sparse_vector< Val, SV >::load_to(), bm::lower_bound(), bm::lower_bound_linear(), bm::encoder::memcpy(), bm::bvector<>::merge(), bm::serial_stream_iterator< DEC >::next(), bm::operation2metric(), bm::sparse_vector< Val, BV >::back_insert_iterator::operator=(), bm::bvector< Alloc >::insert_iterator::operator=(), bm::bvector< Alloc >::bulk_insert_iterator::operator=(), bm::bvector<>::operator[](), bm::sparse_vector_scanner< SV >::prepare_and_sub_aggregator(), bm::aggregator< bvector_type >::process_bit_blocks_or(), bm::aggregator< bvector_type >::process_gap_blocks_and(), bm::aggregator< bvector_type >::process_gap_blocks_or(), bm::aggregator< bvector_type >::process_gap_blocks_sub(), bm::compressed_collection< serializer< BV >::buffer, BV >::push_back(), bm::rsc_sparse_vector< Val, SV >::push_back(), bm::bit_out< TEncoder >::put_bit(), bm::bit_out< TEncoder >::put_bits(), bm::deseriaizer_base< bm::decoder >::read_gap_block(), bm::deseriaizer_base< bm::decoder >::read_id_list(), bm::set2set_11_transform< SV >::remap(), bm::aggregator< bvector_type >::resize_target(), bm::bvps_addr_resolver< bvector_type >::resolve(), bm::sv_addr_resolver< SV >::resolve(), bm::rsc_sparse_vector< Val, SV >::resolve(), bm::tmatrix< GT, sizeof(GT) *8,(((BLOCK_SIZE *sizeof(unsigned))/(sizeof(GT)))/(sizeof(GT) *8))>::row(), bm::basic_bmatrix< bm::bvector<> >::row(), bm::rsc_sparse_vector< Val, SV >::rsc_sparse_vector(), bm::aggregator< bvector_type >::run_step(), bm::bvector<>::running_count_blocks(), bm::random_subset< BV >::sample(), bm::bvector<>::select(), bm::serializer< bvector_type >::serialize(), bm::bvps_addr_resolver< bvector_type >::set(), bm::bvector<>::set_bit_and(), bm::bvector<>::set_bit_no_check(), bm::set_gap_level(), bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::set_metric(), bm::basic_bmatrix< bm::bvector<> >::set_octet(), bm::bvector<>::set_range(), bm::sparse_vector_scanner< SV >::set_search_range(), bm::setop2op(), bm::bvector<>::shift_right(), bm::bvector< Alloc >::enumerator::skip(), bm::serial_stream_iterator< DEC >::skip_mono_blocks(), bm::aggregator< bvector_type >::sort_input_blocks_and(), bm::aggregator< bvector_type >::sort_input_blocks_or(), bm::sse2_gap_find(), bm::sse42_shift_r1_and(), bm::sse4_gap_find(), bm::aggregator< bvector_type >::stage(), bm::rsc_sparse_vector< Val, SV >::sync(), bm::basic_bmatrix< bm::bvector<> >::test_4rows(), bm::tmatrix_reduce(), bm::tmatrix_restore(), bm::gap_transpose_engine< GT, BT, BLOCK_SIZE >::transpose(), bm::gap_transpose_engine< GT, BT, BLOCK_SIZE >::trestore(), bm::sparse_vector< Val, BV >::const_iterator::value(), bm::vect_bit_transpose(), bm::word_select64_bitscan(), bm::word_select64_linear(), bm::xor_swap(), bm::aggregator< bvector_type >::~aggregator(), and bm::pointer_pool_array::~pointer_pool_array().

◆ BM_ASSERT_THROW

#define BM_ASSERT_THROW (   x,
  xerrcode 
)

◆ BM_BLOCK_TYPE

#define BM_BLOCK_TYPE (   addr)    bm::all_set<true>::block_type(addr)

Definition at line 142 of file bmdef.h.

◆ BM_IS_GAP

#define BM_IS_GAP (   ptr)    bool(BMPTR_TESTBIT0(ptr)!=0)

◆ BM_SET_MMX_GUARD

#define BM_SET_MMX_GUARD

◆ BM_VECT_ALIGN

#define BM_VECT_ALIGN   BM_ALIGN16

◆ BM_VECT_ALIGN_ATTR

#define BM_VECT_ALIGN_ATTR   BM_ALIGN16ATTR

◆ BM_x86

#define BM_x86

Definition at line 69 of file bmdef.h.

◆ BMFORCEINLINE

#define BMFORCEINLINE   inline

◆ BMGAP_PTR

#define BMGAP_PTR (   ptr)    ((bm::gap_word_t*)BMPTR_CLEARBIT0(ptr))

◆ BMNOEXEPT

#define BMNOEXEPT   noexcept

◆ BMPTR_CLEARBIT0

#define BMPTR_CLEARBIT0 (   ptr)    ( ((bm::id64_t)ptr) & ~(bm::id64_t)1 )

Definition at line 154 of file bmdef.h.

◆ BMPTR_SETBIT0

#define BMPTR_SETBIT0 (   ptr)    ( ((bm::id64_t)ptr) | 1 )

◆ BMPTR_TESTBIT0

#define BMPTR_TESTBIT0 (   ptr)    ( ((bm::id64_t)ptr) & 1 )

Definition at line 155 of file bmdef.h.

◆ BMREGISTER

#define BMREGISTER

Definition at line 86 of file bmdef.h.

Referenced by bm::gap_convert_to_arr().

◆ BMRESTRICT

#define BMRESTRICT

◆ BMSET_PTRGAP

#define BMSET_PTRGAP (   ptr)    ptr = (bm::word_t*)BMPTR_SETBIT0(ptr)

◆ FULL_BLOCK_FAKE_ADDR

#define FULL_BLOCK_FAKE_ADDR   bm::all_set<true>::_block._p_fullp

◆ FULL_BLOCK_REAL_ADDR

#define FULL_BLOCK_REAL_ADDR   bm::all_set<true>::_block._p

◆ IS_EMPTY_BLOCK

#define IS_EMPTY_BLOCK (   addr)    bool(addr == 0)

◆ IS_FULL_BLOCK

#define IS_FULL_BLOCK (   addr)    bm::all_set<true>::is_full_block(addr)

◆ IS_VALID_ADDR

#define IS_VALID_ADDR (   addr)    bm::all_set<true>::is_valid_block_addr(addr)