Skip to content

Commit e27b85d

Browse files
committed
Refine sfinae to avoid ambiguities with old api
1 parent 6f28a9f commit e27b85d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cub/cub/device/device_merge.cuh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ struct DeviceMerge
179179
typename CompareOp = ::cuda::std::less<>,
180180
typename EnvT = ::cuda::std::execution::env<>,
181181
::cuda::std::enable_if_t<!::cuda::std::is_same_v<KeyIteratorIn1, void*>
182-
&& !::cuda::std::is_same_v<KeyIteratorIn1, ::cuda::std::nullptr_t>,
182+
&& !::cuda::std::is_same_v<KeyIteratorIn1, ::cuda::std::nullptr_t>
183+
&& !::cuda::std::is_arithmetic_v<CompareOp>,
183184
int> = 0>
184185
[[nodiscard]] CUB_RUNTIME_FUNCTION static cudaError_t MergeKeys(
185186
KeyIteratorIn1 keys_in1,
@@ -405,7 +406,8 @@ struct DeviceMerge
405406
typename CompareOp = ::cuda::std::less<>,
406407
typename EnvT = ::cuda::std::execution::env<>,
407408
::cuda::std::enable_if_t<!::cuda::std::is_same_v<KeyIteratorIn1, void*>
408-
&& !::cuda::std::is_same_v<KeyIteratorIn1, ::cuda::std::nullptr_t>,
409+
&& !::cuda::std::is_same_v<KeyIteratorIn1, ::cuda::std::nullptr_t>
410+
&& !::cuda::std::is_arithmetic_v<CompareOp>,
409411
int> = 0>
410412
[[nodiscard]] CUB_RUNTIME_FUNCTION static cudaError_t MergePairs(
411413
KeyIteratorIn1 keys_in1,

0 commit comments

Comments
 (0)