#include <stdlib.h>
Go to the source code of this file.
◆ DEBUG_UNUSED
#define DEBUG_UNUSED |
( |
| ident | ) |
|
Value:ident __attribute__((unused))
Definition at line 8 of file core.h.
◆ EXPAND
Value:
Definition at line 17 of file core.h.
◆ FORCE_INLINE
#define FORCE_INLINE inline __attribute__((always_inline)) |
◆ LIKELY
Value:__builtin_expect(!!(x), 1)
Definition at line 15 of file core.h.
◆ NAME
#define NAME |
( |
| pre, |
|
|
| post ) |
Value:
#define NAME_EXPANDED(pre, post)
Definition at line 5 of file core.h.
◆ NAME_EXPANDED
#define NAME_EXPANDED |
( |
| pre, |
|
|
| post ) |
Value:
Definition at line 4 of file core.h.
◆ UNUSED
Value:ident __attribute__((unused))
Definition at line 13 of file core.h.
◆ next_power_of_2()
size_t next_power_of_2 |
( |
size_t | x | ) |
|
|
inlinestatic |
Definition at line 28 of file core.h.
28 {
29 if (x == 0)
30 return 1;
31 x--;
32 x |= x >> 1;
33 x |= x >> 2;
34 x |= x >> 4;
35 x |= x >> 8;
36 x |= x >> 16;
37#if SIZE_MAX > 0xFFFFFFFF
38 x |= x >> 32;
39#endif
40 return x + 1;
41}