mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 20:24:07 +00:00
16 lines
347 B
C++
16 lines
347 B
C++
#if defined(_MSC_VER)
|
|
# if !defined(likely)
|
|
# define likely(x) (x)
|
|
# endif
|
|
# if !defined(unlikely)
|
|
# define unlikely(x) (x)
|
|
# endif
|
|
#else
|
|
# if !defined(likely)
|
|
# define likely(x) (__builtin_expect(!!(x), 1))
|
|
# endif
|
|
# if !defined(unlikely)
|
|
# define unlikely(x) (__builtin_expect(!!(x), 0))
|
|
# endif
|
|
#endif
|