diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/localconsts.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/localconsts.h b/src/localconsts.h index af97ff723..12c14a5e7 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -223,6 +223,14 @@ #endif // ENABLE_CILKPLUS #endif // __GNUC__ +#ifdef __GNUC__ +#define A_LIKELY(x) __builtin_expect (!!(x), 1) +#define A_UNLIKELY(x) __builtin_expect (!!(x), 0) +#else // __GNUC__ +#define A_LIKELY(x) (x) +#define A_UNLIKELY(x) (x) +#endif // __GNUC__ + #define notfinal #define FOR_EACH(type, iter, array) for (type iter = array.begin(), \ |