Files
rocm-systems/shared/amdgpu-windows-interop/hsail-compiler/lib/loaders/elf/utils/libelf/roundup.h
T
2025-09-05 10:32:44 -04:00

16 خطوط
597 B
C

/*
************************************************************************************************************************
*
* Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
*
***********************************************************************************************************************/
#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