From 6386d42f509f72f061e84bace00277f42cfde9d4 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Fri, 10 Jan 2025 21:55:21 +0100 Subject: [PATCH] Deprecate cub::Swap (#3333) --- cub/cub/thread/thread_sort.cuh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cub/cub/thread/thread_sort.cuh b/cub/cub/thread/thread_sort.cuh index 7d9e8622f82..e21d9dd3ecd 100644 --- a/cub/cub/thread/thread_sort.cuh +++ b/cub/cub/thread/thread_sort.cuh @@ -45,6 +45,7 @@ CUB_NAMESPACE_BEGIN template +CCCL_DEPRECATED_BECAUSE("Use cuda::std::swap") _CCCL_DEVICE _CCCL_FORCEINLINE void Swap(T& lhs, T& rhs) { T temp = lhs; @@ -95,10 +96,11 @@ StableOddEvenSort(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&items)[ITEMS_PER_THRE { if (compare_op(keys[j + 1], keys[j])) { - Swap(keys[j], keys[j + 1]); + using ::cuda::std::swap; + swap(keys[j], keys[j + 1]); if (!KEYS_ONLY) { - Swap(items[j], items[j + 1]); + swap(items[j], items[j + 1]); } } } // inner loop