CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/FWCore/Utilities/interface/Likely.h

Go to the documentation of this file.
00001 #ifndef FWCore_Utilities_Likely_h
00002 #define FWCore_Utilities_Likely_h
00003 #include "FWCore/Utilities/interface/GCCPrerequisite.h"
00004 
00005 #if GCC_PREREQUISITE(3,0,0)
00006 
00007 #if defined(NO_LIKELY)
00008 #define likely(x) (x)
00009 #define unlikely(x) (x)   
00010 #elif defined(REVERSE_LIKELY)
00011 #define unlikely(x) (__builtin_expect(x, true))
00012 #define likely(x) (__builtin_expect(x, false))
00013 #else
00014 #define likely(x) (__builtin_expect(x, true))
00015 #define unlikely(x) (__builtin_expect(x, false))
00016 #endif
00017 
00018 #else
00019 #define NO_LIKELY
00020 #define likely(x) (x)  
00021 #define unlikely(x) (x)
00022 #endif
00023 
00024 #endif