diff --git a/cub/cub/util_device.cuh b/cub/cub/util_device.cuh index 498f17c1259..fd356b8f9e5 100644 --- a/cub/cub/util_device.cuh +++ b/cub/cub/util_device.cuh @@ -713,4 +713,6 @@ private: CUB_NAMESPACE_END -#include // to complete the definition of TripleChevronFactory +#if _CCCL_HAS_CUDA_COMPILER +# include // to complete the definition of TripleChevronFactory +#endif // _CCCL_HAS_CUDA_COMPILER diff --git a/libcudacxx/include/cuda/std/__mdspan/config.h b/libcudacxx/include/cuda/std/__mdspan/config.h index 9f1c9898dd2..4cbeffc18c2 100644 --- a/libcudacxx/include/cuda/std/__mdspan/config.h +++ b/libcudacxx/include/cuda/std/__mdspan/config.h @@ -245,32 +245,6 @@ static_assert(__MDSPAN_CPLUSPLUS >= __MDSPAN_CXX_STD_14, "mdspan requires C++14 # endif # endif -# if __MDSPAN_USE_BRACKET_OPERATOR -# define __MDSPAN_OP(mds, ...) mds[__VA_ARGS__] -// Corentins demo compiler for subscript chokes on empty [] call, -// though I believe the proposal supports it? -# ifdef __MDSPAN_NO_EMPTY_BRACKET_OPERATOR -# define __MDSPAN_OP0(mds) mds.accessor().access(mds.data_handle(), 0) -# else -# define __MDSPAN_OP0(mds) mds[] -# endif -# define __MDSPAN_OP1(mds, a) mds[a] -# define __MDSPAN_OP2(mds, a, b) mds[a, b] -# define __MDSPAN_OP3(mds, a, b, c) mds[a, b, c] -# define __MDSPAN_OP4(mds, a, b, c, d) mds[a, b, c, d] -# define __MDSPAN_OP5(mds, a, b, c, d, e) mds[a, b, c, d, e] -# define __MDSPAN_OP6(mds, a, b, c, d, e, f) mds[a, b, c, d, e, f] -# else -# define __MDSPAN_OP(mds, ...) mds(__VA_ARGS__) -# define __MDSPAN_OP0(mds) mds() -# define __MDSPAN_OP1(mds, a) mds(a) -# define __MDSPAN_OP2(mds, a, b) mds(a, b) -# define __MDSPAN_OP3(mds, a, b, c) mds(a, b, c) -# define __MDSPAN_OP4(mds, a, b, c, d) mds(a, b, c, d) -# define __MDSPAN_OP5(mds, a, b, c, d, e) mds(a, b, c, d, e) -# define __MDSPAN_OP6(mds, a, b, c, d, e, f) mds(a, b, c, d, e, f) -# endif - #endif // _CCCL_STD_VER > 2011 #endif // _LIBCUDACXX___MDSPAN_CONFIG_HPP diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/ctad_c_array.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/ctad_c_array.pass.cpp index 930a772b596..9288d444402 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/ctad_c_array.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/ctad_c_array.pass.cpp @@ -32,7 +32,7 @@ int main(int, char**) assert(m.rank_dynamic() == 0); assert(m.static_extent(0) == 5); assert(m.extent(0) == 5); - assert(__MDSPAN_OP(m, 2) == 3); + assert(m[2] == 3); cuda::std::mdspan m2(data, 3); @@ -43,7 +43,7 @@ int main(int, char**) assert(m2.rank() == 1); assert(m2.rank_dynamic() == 1); assert(m2.extent(0) == 3); - assert(__MDSPAN_OP(m2, 2) == 3); + assert(m2[2] == 3); } #endif diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/ctad_const_c_array.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/ctad_const_c_array.pass.cpp index 7957a3cdd39..04656311604 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/ctad_const_c_array.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/mdspan.mdspan.cons/ctad_const_c_array.pass.cpp @@ -32,7 +32,7 @@ int main(int, char**) assert(m.rank_dynamic() == 0); assert(m.static_extent(0) == 5); assert(m.extent(0) == 5); - assert(__MDSPAN_OP(m, 2) == 3); + assert(m[2] == 3); } #endif diff --git a/thrust/thrust/detail/contiguous_storage.h b/thrust/thrust/detail/contiguous_storage.h index 2391a3a968a..359b45c1ea2 100644 --- a/thrust/thrust/detail/contiguous_storage.h +++ b/thrust/thrust/detail/contiguous_storage.h @@ -131,7 +131,7 @@ class contiguous_storage } else if constexpr (!allocator_traits::is_always_equal::value) { - NV_IF_TARGET(NV_IS_DEVICE, (assert(m_allocator == other);), (if (m_allocator != other.m_allocator) { + NV_IF_TARGET(NV_IS_DEVICE, (assert(m_allocator == other.m_allocator);), (if (m_allocator != other.m_allocator) { throw allocator_mismatch_on_swap(); })); }