50 #if defined(_WIN32) || defined(_WIN64) 51 #define CUB_ALIGN(bytes) __declspec(align(32)) 54 #define CUB_ALIGN(bytes) __attribute__((aligned(bytes))) 60 #define CUB_MAX(a, b) (((b) > (a)) ? (b) : (a)) 65 #define CUB_MIN(a, b) (((b) < (a)) ? (b) : (a)) 69 #ifndef CUB_QUOTIENT_FLOOR 70 #define CUB_QUOTIENT_FLOOR(x, y) ((x) / (y)) 74 #ifndef CUB_QUOTIENT_CEILING 75 #define CUB_QUOTIENT_CEILING(x, y) (((x) + (y) - 1) / (y)) 79 #ifndef CUB_ROUND_UP_NEAREST 80 #define CUB_ROUND_UP_NEAREST(x, y) ((((x) + (y) - 1) / (y)) * y) 84 #ifndef CUB_ROUND_DOWN_NEAREST 85 #define CUB_ROUND_DOWN_NEAREST(x, y) (((x) / (y)) * y) 90 #ifndef CUB_STATIC_ASSERT 91 #ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document 92 #define CUB_CAT_(a, b) a ## b 93 #define CUB_CAT(a, b) CUB_CAT_(a, b) 94 #endif // DOXYGEN_SHOULD_SKIP_THIS 97 #define CUB_STATIC_ASSERT(cond, msg) typedef int CUB_CAT(cub_static_assert, __LINE__)[(cond) ? 1 : -1] Optional outer namespace(s)