Skip to content

Commit b6d5a17

Browse files
authored
Merge pull request #441 from masterleinad/fix_nvcc_warnings_numeric_limits
Only use cuda::std::numeric_limits with nvcc
2 parents 874ec9b + dcd5311 commit b6d5a17

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/experimental/__p0009_bits/utility.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <type_traits>
55
#include <array>
66
#include <utility>
7-
#ifdef MDSPAN_IMPL_HAS_CUDA
7+
#if defined(MDSPAN_IMPL_HAS_CUDA) && defined(__NVCC__)
88
#include <cuda/std/limits>
99
#else
1010
#include <limits>
@@ -203,7 +203,7 @@ MDSPAN_INLINE_FUNCTION constexpr bool cmp_greater_equal(T t, U u) noexcept {
203203

204204
template <class R, class T>
205205
MDSPAN_INLINE_FUNCTION constexpr bool in_range(T t) noexcept {
206-
#ifdef MDSPAN_IMPL_HAS_CUDA
206+
#if defined(MDSPAN_IMPL_HAS_CUDA) && defined(__NVCC__)
207207
using cuda::std::numeric_limits;
208208
#else
209209
using std::numeric_limits;
@@ -226,7 +226,7 @@ check_mul_result_is_nonnegative_and_representable(T a, T b) {
226226
if constexpr (std::is_signed_v<T>) {
227227
if ( a < 0 || b < 0 ) return false;
228228
}
229-
#ifdef MDSPAN_IMPL_HAS_CUDA
229+
#if defined(MDSPAN_IMPL_HAS_CUDA) && defined(__NVCC__)
230230
using cuda::std::numeric_limits;
231231
#else
232232
using std::numeric_limits;

0 commit comments

Comments
 (0)