ndtree
nd-octree data-structure and algorithms
likely.hpp File Reference

LIKELY/UNLIKELY Macros (hints for branch prediction) More...

Detailed Description

LIKELY/UNLIKELY Macros (hints for branch prediction)

Use like this:

if(NDTREE_UNLIKELY(1 == 0)) { ... } int f(bool); bool b = true; int a = f(NDTREE_LIKELY(b));

To disable LIKELY/UNLIKELY: define NDTREE_DISABLE_LIKELY_MACROS