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 BMNOEXCEPT   noexcept
 
#define BMNOEXCEPT2
 
#define BMNOEXCEPT2
 
#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 FULL_SUB_BLOCK_REAL_ADDR   bm::all_set<true>::_block._s
 
#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)
 
#define __has_cpp_attribute(x)   0
 
#define __has_attribute(x)   0
 
#define BM_FALLTHROUGH
 

Detailed Description

Definitions(internal)

Definition in file bmdef.h.

Macro Definition Documentation

◆ __has_attribute

#define __has_attribute (   x)    0

Definition at line 409 of file bmdef.h.

◆ __has_cpp_attribute

#define __has_cpp_attribute (   x)    0

Definition at line 406 of file bmdef.h.

◆ BLOCK_ADDR_SAN

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

Definition at line 151 of file bmdef.h.

◆ BM64_SSE4

#define BM64_SSE4

Definition at line 215 of file bmdef.h.

◆ BM_ALIGN16

#define BM_ALIGN16

Definition at line 276 of file bmdef.h.

◆ BM_ALIGN16ATTR

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

Definition at line 277 of file bmdef.h.

◆ BM_ALIGN32

#define BM_ALIGN32

Definition at line 281 of file bmdef.h.

◆ BM_ALIGN32ATTR

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

Definition at line 282 of file bmdef.h.

◆ BM_ALIGN64

#define BM_ALIGN64

Definition at line 286 of file bmdef.h.

◆ BM_ALIGN64ATTR

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

Definition at line 287 of file bmdef.h.

◆ BM_ASSERT

#define BM_ASSERT   assert

Definition at line 130 of file bmdef.h.

◆ BM_ASSERT_THROW

#define BM_ASSERT_THROW (   x,
  xerrcode 
)

Definition at line 401 of file bmdef.h.

◆ BM_BLOCK_TYPE

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

Definition at line 156 of file bmdef.h.

◆ BM_FALLTHROUGH

#define BM_FALLTHROUGH

Definition at line 421 of file bmdef.h.

◆ BM_IS_GAP

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

Definition at line 181 of file bmdef.h.

◆ BM_SET_MMX_GUARD

#define BM_SET_MMX_GUARD

Definition at line 246 of file bmdef.h.

◆ BM_VECT_ALIGN

#define BM_VECT_ALIGN   BM_ALIGN16

Definition at line 359 of file bmdef.h.

◆ BM_VECT_ALIGN_ATTR

#define BM_VECT_ALIGN_ATTR   BM_ALIGN16ATTR

Definition at line 360 of file bmdef.h.

◆ BM_x86

#define BM_x86

Definition at line 69 of file bmdef.h.

◆ BMFORCEINLINE

#define BMFORCEINLINE   inline

Definition at line 203 of file bmdef.h.

◆ BMGAP_PTR

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

Definition at line 179 of file bmdef.h.

◆ BMNOEXCEPT

#define BMNOEXCEPT   noexcept

Definition at line 79 of file bmdef.h.

◆ BMNOEXCEPT2 [1/2]

#define BMNOEXCEPT2

Definition at line 99 of file bmdef.h.

◆ BMNOEXCEPT2 [2/2]

#define BMNOEXCEPT2

Definition at line 99 of file bmdef.h.

◆ BMPTR_CLEARBIT0

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

Definition at line 168 of file bmdef.h.

◆ BMPTR_SETBIT0

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

Definition at line 167 of file bmdef.h.

◆ BMPTR_TESTBIT0

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

Definition at line 169 of file bmdef.h.

◆ BMRESTRICT

#define BMRESTRICT

Definition at line 193 of file bmdef.h.

◆ BMSET_PTRGAP

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

Definition at line 180 of file bmdef.h.

◆ FULL_BLOCK_FAKE_ADDR

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

Definition at line 149 of file bmdef.h.

◆ FULL_BLOCK_REAL_ADDR

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

Definition at line 148 of file bmdef.h.

◆ FULL_SUB_BLOCK_REAL_ADDR

#define FULL_SUB_BLOCK_REAL_ADDR   bm::all_set<true>::_block._s

Definition at line 150 of file bmdef.h.

◆ IS_EMPTY_BLOCK

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

Definition at line 154 of file bmdef.h.

◆ IS_FULL_BLOCK

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

Definition at line 153 of file bmdef.h.

◆ IS_VALID_ADDR

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

Definition at line 152 of file bmdef.h.