Skip to content

Commit

Permalink
fixes cuda 11.5
Browse files Browse the repository at this point in the history
  • Loading branch information
alfC committed Feb 18, 2025
1 parent 6e2ad67 commit 67d145b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions include/boost/multi/detail/tuple_zip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,6 @@ constexpr auto get(tuple<T0, Ts...> const& t) -> auto const& { // NOLINT(readab
return get<N - 1>(t.tail());
}
}
#if defined __NVCC__
#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
#pragma nv_diagnostic pop
#else
#pragma diagnostic pop
#endif
#elif defined __NVCOMPILER
#pragma diagnostic pop
#endif

template<std::size_t N, class T0, class... Ts>
constexpr auto get(tuple<T0, Ts...>& tup) -> auto& {
Expand All @@ -330,6 +321,17 @@ constexpr auto get(tuple<T0, Ts...>&& tup) -> auto&& {
return get<N - 1>(std::move(std::move(tup).tail()));
}
}

#if defined __NVCC__
#ifdef __NVCC_DIAG_PRAGMA_SUPPORT__
#pragma nv_diagnostic pop
#else
#pragma diagnostic pop
#endif
#elif defined __NVCOMPILER
#pragma diagnostic pop
#endif

#if ! defined(_MSC_VER)
#pragma GCC diagnostic pop
#endif
Expand Down
2 changes: 1 addition & 1 deletion test/array_cref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// https://www.boost.org/LICENSE_1_0.txt

#ifdef __NVCC__ // affects cuda 11.4.3
#pragma diag_suppress 20014 // error #20014-D: calling a __host__ function from a __host__ __device__ function is not allowed
#pragma nv_diag_suppress 20014 // error #20014-D: calling a __host__ function from a __host__ __device__ function is not allowed
#endif

#include <boost/multi/array.hpp> // for array, array_ref, subarray, arra...
Expand Down

0 comments on commit 67d145b

Please sign in to comment.