50 #if defined(_WIN32) || defined(_WIN64)
52 #define CUB_ALIGN(bytes) __declspec(align(32))
55 #define CUB_ALIGN(bytes) __attribute__((aligned(bytes)))
61 #define CUB_MAX(a, b) (((b) > (a)) ? (b) : (a))
66 #define CUB_MIN(a, b) (((b) < (a)) ? (b) : (a))
69#ifndef CUB_QUOTIENT_FLOOR
71 #define CUB_QUOTIENT_FLOOR(x, y) ((x) / (y))
74#ifndef CUB_QUOTIENT_CEILING
76 #define CUB_QUOTIENT_CEILING(x, y) (((x) + (y) - 1) / (y))
79#ifndef CUB_ROUND_UP_NEAREST
81 #define CUB_ROUND_UP_NEAREST(x, y) ((((x) + (y) - 1) / (y)) * y)
84#ifndef CUB_ROUND_DOWN_NEAREST
86 #define CUB_ROUND_DOWN_NEAREST(x, y) (((x) / (y)) * y)
90#ifndef CUB_STATIC_ASSERT
91 #ifndef DOXYGEN_SHOULD_SKIP_THIS
92 #define CUB_CAT_(a, b) a ## b
93 #define CUB_CAT(a, b) CUB_CAT_(a, b)
97 #define CUB_STATIC_ASSERT(cond, msg) typedef int CUB_CAT(cub_static_assert, __LINE__)[(cond) ? 1 : -1]
Optional outer namespace(s)