Skip to content

Commit

Permalink
Add default accessor_type to to_mdspan funciton
Browse files Browse the repository at this point in the history
  • Loading branch information
crtrott authored and nmm0 committed May 15, 2024
1 parent c46c1bd commit dfbe1ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/Kokkos_View.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1775,12 +1775,12 @@ class View : public ViewTraits<DataType, Properties...> {
Impl::mapping_from_view_mapping<mdspan_type>(m_map)};
}

template <class OtherAccessorType,
template <class OtherAccessorType = Kokkos::default_accessor<typename traits::value_type>,
typename = std::enable_if_t<std::is_assignable_v<
typename traits::value_type*&,
typename OtherAccessorType::data_handle_type>>>
KOKKOS_INLINE_FUNCTION constexpr auto to_mdspan(
const OtherAccessorType& other_accessor) {
const OtherAccessorType& other_accessor = Kokkos::default_accessor<typename traits::value_type>()) {
using mdspan_type = typename Impl::MDSpanViewTraits<traits>::mdspan_type;
using ret_mdspan_type =
mdspan<typename mdspan_type::element_type,
Expand Down

0 comments on commit dfbe1ac

Please sign in to comment.