From e74f146ac1ace1a977e030e3b332597fdc78472b Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Tue, 8 Oct 2024 09:45:59 -0700 Subject: [PATCH] incorporate changes from https://github.com/kokkos/mdspan/commit/260f525ed71669e5dcf2438622d2c433b3e5c281 --- tpls/mdspan/include/experimental/__p0009_bits/mdspan.hpp | 2 ++ tpls/mdspan/include/experimental/__p0009_bits/utility.hpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tpls/mdspan/include/experimental/__p0009_bits/mdspan.hpp b/tpls/mdspan/include/experimental/__p0009_bits/mdspan.hpp index 23114aa5506..8a5b136b453 100644 --- a/tpls/mdspan/include/experimental/__p0009_bits/mdspan.hpp +++ b/tpls/mdspan/include/experimental/__p0009_bits/mdspan.hpp @@ -21,6 +21,7 @@ #include "extents.hpp" #include "trait_backports.hpp" #include "compressed_pair.hpp" +#include "utility.hpp" namespace MDSPAN_IMPL_STANDARD_NAMESPACE { template < @@ -351,6 +352,7 @@ class mdspan MDSPAN_INLINE_FUNCTION constexpr const extents_type& extents() const noexcept { return __mapping_ref().extents(); }; MDSPAN_INLINE_FUNCTION constexpr const data_handle_type& data_handle() const noexcept { return __ptr_ref(); }; + MDSPAN_INLINE_FUNCTION constexpr data_handle_type& data_handle(mdspan_non_standard_tag) noexcept { return __ptr_ref(); }; MDSPAN_INLINE_FUNCTION constexpr const mapping_type& mapping() const noexcept { return __mapping_ref(); }; MDSPAN_INLINE_FUNCTION constexpr const accessor_type& accessor() const noexcept { return __accessor_ref(); }; diff --git a/tpls/mdspan/include/experimental/__p0009_bits/utility.hpp b/tpls/mdspan/include/experimental/__p0009_bits/utility.hpp index f7f39d6024e..c5cdf9d8217 100644 --- a/tpls/mdspan/include/experimental/__p0009_bits/utility.hpp +++ b/tpls/mdspan/include/experimental/__p0009_bits/utility.hpp @@ -77,12 +77,12 @@ struct integral_constant { MDSPAN_INLINE_FUNCTION_DEFAULTED constexpr integral_constant() = default; - + // These interop functions work, because other than the value_type operator - // everything of std::integral_constant works on device (defaulted functions) + // everything of std::integral_constant works on device (defaulted functions) MDSPAN_FUNCTION constexpr integral_constant(std::integral_constant) {}; - + MDSPAN_FUNCTION constexpr operator std::integral_constant() const noexcept { return std::integral_constant{}; }