ATLAS Offline Software
likely.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
18 #ifndef ATHCONTAINERS_LIKELY_H
19 #define ATHCONTAINERS_LIKELY_H
20 
21 
22 #if __GNUC__ >= 4 || defined(__clang__)
23 # define ATHCONTAINERS_LIKELY(x) __builtin_expect(!!(x), 1)
24 # define ATHCONTAINERS_UNLIKELY(x) __builtin_expect(!!(x), 0)
25 #else
26 # define ATHCONTAINERS_LIKELY(x) (x)
27 # define ATHCONTAINERS_UNLIKELY(x) (x)
28 #endif
29 
30 
31 #endif // not ATHCONTAINERS_LIKELY_H