Files
rocm-systems/rocclr/elf/utils/libelf/roundup.h
T
2020-01-30 20:12:13 -08:00

9 righe
274 B
C

#ifdef __GNUC__
# define roundup(x, y) (__builtin_constant_p (y) && powerof2 (y) \
? (((x) + (y) - 1) & ~((y) - 1)) \
: ((((x) + ((y) - 1)) / (y)) * (y)))
#else
# define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
#endif