Version: SMASH-2.0
macros.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2020
3  * none
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
13 #define likely(x) (x)
15 #define unlikely(x) (x)
17 #endif
18 
24 #define SMASH_UNUSED(x) (void)(x)
25 
27 #define SMASH_DEPRECATED(msg) __attribute__((deprecated(msg)))
28 
29 #endif // SRC_INCLUDE_SMASH_MACROS_H_