Skip to content

Commit

Permalink
kokkos#6805: address some initial PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nmm0 committed May 15, 2024
1 parent df54132 commit 885c953
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
6 changes: 1 addition & 5 deletions core/src/Kokkos_View.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,7 @@ struct MDSpanViewTraits {
using mdspan_type = UnsupportedKokkosArrayLayout;
};

/**
* "Natural" mdspan for a view if the View's ArrayLayout is supported.
*/
// "Natural" mdspan for a view if the View's ArrayLayout is supported.
template <class Traits>
struct MDSpanViewTraits<
Traits, std::void_t<typename Experimental::Impl::LayoutFromArrayLayout<
Expand Down Expand Up @@ -1754,7 +1752,6 @@ class View : public ViewTraits<DataType, Properties...> {
//----------------------------------------
// MDSpan converting constructors
#ifdef KOKKOS_ENABLE_IMPL_MDSPAN
public:
template <typename U = typename Experimental::Impl::MDSpanViewTraits<
traits>::mdspan_type>
KOKKOS_INLINE_FUNCTION MDSPAN_CONDITIONAL_EXPLICIT(traits::is_managed) View(
Expand All @@ -1770,7 +1767,6 @@ class View : public ViewTraits<DataType, Properties...> {

//----------------------------------------
// Conversion to MDSpan
public:
template <class OtherElementType, class OtherExtents, class OtherLayoutPolicy,
class OtherAccessor>
KOKKOS_INLINE_FUNCTION constexpr operator mdspan<
Expand Down
1 change: 0 additions & 1 deletion core/src/View/MDSpan/Kokkos_MDSpan_Extents.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ static_assert(false,
#define KOKKOS_EXPERIMENTAL_MDSPAN_EXTENTS_HPP

#include "Kokkos_MDSpan_Header.hpp"
#include <Kokkos_Core_fwd.hpp>

namespace Kokkos::Impl {

Expand Down
4 changes: 2 additions & 2 deletions core/src/View/MDSpan/Kokkos_MDSpan_Layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ KOKKOS_INLINE_FUNCTION auto array_layout_from_mapping(
using mapping_type = typename MDSpanType::mapping_type;
using extents_type = typename mapping_type::extents_type;

static constexpr auto rank = extents_type::rank();
const auto &ext = mapping.extents();
constexpr auto rank = extents_type::rank();
const auto &ext = mapping.extents();

static_assert(rank <= ARRAY_LAYOUT_MAX_RANK,
"Unsupported rank for mdspan (must be <= 8)");
Expand Down

0 comments on commit 885c953

Please sign in to comment.