Version: SMASH-3.1
macros.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2015,2017-2018,2020,2022-2023
3  * SMASH Team
4  */
5 #ifndef SRC_INCLUDE_SMASH_MACROS_H_
6 #define SRC_INCLUDE_SMASH_MACROS_H_
7 
8 /* support for gcc branch prediction */
9 #ifdef __GNUC__
10 #define likely(x) __builtin_expect((x), 1)
11 #define unlikely(x) __builtin_expect((x), 0)
12 #else
14 #define likely(x) (x)
16 #define unlikely(x) (x)
17 #endif
18 
20 #define SMASH_DEPRECATED(msg) __attribute__((deprecated(msg)))
21 
22 #endif // SRC_INCLUDE_SMASH_MACROS_H_