From 32f41dd71aeb7cbc43114bed404f28eabba61894 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Tue, 21 Jan 2025 17:13:06 +0100 Subject: [PATCH] Deprecate a few CUB macros (#3456) --- cub/cub/util_macro.cuh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cub/cub/util_macro.cuh b/cub/cub/util_macro.cuh index c591a800829..e95a7136f43 100644 --- a/cub/cub/util_macro.cuh +++ b/cub/cub/util_macro.cuh @@ -51,32 +51,38 @@ CUB_NAMESPACE_BEGIN #ifndef CUB_MAX /// Select maximum(a, b) +/// Deprecated since [2.8] # define CUB_MAX(a, b) (((b) > (a)) ? (b) : (a)) #endif #ifndef CUB_MIN /// Select minimum(a, b) +/// Deprecated since [2.8] # define CUB_MIN(a, b) (((b) < (a)) ? (b) : (a)) #endif #ifndef CUB_QUOTIENT_FLOOR /// Quotient of x/y rounded down to nearest integer +/// Deprecated since [2.8] # define CUB_QUOTIENT_FLOOR(x, y) ((x) / (y)) #endif #ifndef CUB_QUOTIENT_CEILING /// Quotient of x/y rounded up to nearest integer +/// Deprecated since [2.8] // FIXME(bgruber): the following computation can overflow, use cuda::ceil_div instead # define CUB_QUOTIENT_CEILING(x, y) (((x) + (y) - 1) / (y)) #endif #ifndef CUB_ROUND_UP_NEAREST /// x rounded up to the nearest multiple of y +/// Deprecated since [2.8] # define CUB_ROUND_UP_NEAREST(x, y) (CUB_QUOTIENT_CEILING(x, y) * y) #endif #ifndef CUB_ROUND_DOWN_NEAREST /// x rounded down to the nearest multiple of y +/// Deprecated since [2.8] # define CUB_ROUND_DOWN_NEAREST(x, y) (((x) / (y)) * y) #endif