Skip to content

Commit

Permalink
Avoid tempalte issue
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Feb 26, 2025
1 parent bc842fa commit a964fd9
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions cpp/tests/linalg/map_then_reduce.cu
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@

#include <limits>

#if CCCL_MAJOR_VERSION >= 3
using minimum = cuda::minimum;
using maximum = cuda::maximum;
#else
using minimum = cub::Min;
using maximum = cub::Max;
#endif

namespace raft {
namespace linalg {

Expand Down Expand Up @@ -167,6 +159,12 @@ class MapGenericReduceTest : public ::testing::Test {

void testMin()
{
#if CCCL_MAJOR_VERSION >= 3
using cuda::minimum;
#else
using minimum = cub::Min;
#endif

OutType neutral = std::numeric_limits<InType>::max();
auto output_view = raft::make_device_scalar_view(output.data());
auto input_view = raft::make_device_vector_view<const InType>(
Expand All @@ -177,6 +175,11 @@ class MapGenericReduceTest : public ::testing::Test {
}
void testMax()
{
#if CCCL_MAJOR_VERSION >= 3
using cuda::maximum;
#else
using maximum = cub::Max;
#endif
OutType neutral = std::numeric_limits<InType>::min();
auto output_view = raft::make_device_scalar_view(output.data());
auto input_view = raft::make_device_vector_view<const InType>(
Expand Down

0 comments on commit a964fd9

Please sign in to comment.