Files
rocm-systems/rocclr/elf/utils/libelf/roundup.h
T

9 righe
274 B
C

2014-07-04 16:17:05 -04:00
#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