diff --git a/cpp/include/raft/detail/mdarray.hpp b/cpp/include/raft/detail/mdarray.hpp index 9f0f275eaa..624c7a4d07 100644 --- a/cpp/include/raft/detail/mdarray.hpp +++ b/cpp/include/raft/detail/mdarray.hpp @@ -22,6 +22,7 @@ */ #pragma once #include +#include // dynamic_extent #include #include #include @@ -234,7 +235,7 @@ using device_accessor = accessor_mixin; namespace stdex = std::experimental; -using vector_extent = stdex::extents; -using matrix_extent = stdex::extents; +using vector_extent = stdex::extents; +using matrix_extent = stdex::extents; using scalar_extent = stdex::extents<1>; } // namespace raft::detail diff --git a/cpp/include/raft/detail/span.hpp b/cpp/include/raft/detail/span.hpp index 8a26a33247..2a54e9c8a2 100644 --- a/cpp/include/raft/detail/span.hpp +++ b/cpp/include/raft/detail/span.hpp @@ -15,12 +15,13 @@ */ #pragma once +#include #include // numeric_limits #include // __host__ __device__ #include namespace raft { -constexpr std::size_t dynamic_extent = std::numeric_limits::max(); +constexpr std::size_t dynamic_extent = std::experimental::dynamic_extent; template class span; diff --git a/cpp/test/mdarray.cu b/cpp/test/mdarray.cu index 60860f90f4..961a703a8b 100644 --- a/cpp/test/mdarray.cu +++ b/cpp/test/mdarray.cu @@ -42,7 +42,7 @@ void test_mdspan() auto stream = rmm::cuda_stream_default; rmm::device_uvector a{16ul, stream}; thrust::sequence(rmm::exec_policy(stream), a.begin(), a.end()); - stdex::mdspan> span{ + stdex::mdspan> span{ a.data(), 4, 4}; thrust::device_vector status(1, 0); auto p_status = status.data().get(); @@ -74,7 +74,7 @@ TEST(MDArray, Policy) { test_uvector_policy(); } void test_mdarray_basic() { - using matrix_extent = stdex::extents; + using matrix_extent = stdex::extents; auto s = rmm::cuda_stream_default; { /** @@ -180,7 +180,7 @@ TEST(MDArray, Basic) { test_mdarray_basic(); } template void test_mdarray_copy_move(ThrustPolicy exec, PolicyFn make_policy) { - using matrix_extent = stdex::extents; + using matrix_extent = stdex::extents; layout_c_contiguous::mapping layout{matrix_extent{4, 4}}; using mdarray_t = BasicMDarray; @@ -251,7 +251,7 @@ void test_mdarray_copy_move(ThrustPolicy exec, PolicyFn make_policy) TEST(MDArray, CopyMove) { - using matrix_extent = stdex::extents; + using matrix_extent = stdex::extents; using d_matrix_t = device_mdarray; using policy_t = typename d_matrix_t::container_policy_type; auto s = rmm::cuda_stream_default;