test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Likely.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_Likely_h
2 #define FWCore_Utilities_Likely_h
4 
5 #if GCC_PREREQUISITE(3,0,0)
6 
7 #if defined(NO_LIKELY)
8 #define likely(x) (x)
9 #define unlikely(x) (x)
10 #elif defined(REVERSE_LIKELY)
11 #define unlikely(x) (__builtin_expect(x, true))
12 #define likely(x) (__builtin_expect(x, false))
13 #else
14 #define likely(x) (__builtin_expect(x, true))
15 #define unlikely(x) (__builtin_expect(x, false))
16 #endif
17 
18 #else
19 #define NO_LIKELY
20 #define likely(x) (x)
21 #define unlikely(x) (x)
22 #endif
23 
24 #endif