Skip to content

Commit

Permalink
kokkos#6805: more formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nmm0 committed Mar 7, 2024
1 parent bbb8b90 commit cb3f579
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/src/View/MDSpan/Kokkos_MDSpan_Layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,14 @@ struct ViewOffsetFromExtents {
Kokkos::Impl::ViewOffset<typename data_analysis::dimension, array_layout>;
};

template<class ArrayLayout, class MDSpanType>
KOKKOS_INLINE_FUNCTION auto array_layout_from_mapping(const typename MDSpanType::mapping_type &mapping) {
template <class ArrayLayout, class MDSpanType>
KOKKOS_INLINE_FUNCTION auto array_layout_from_mapping(
const typename MDSpanType::mapping_type &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();
const auto &ext = mapping.extents();

static_assert(rank <= ARRAY_LAYOUT_MAX_RANK,
"Unsupported rank for mdspan (must be <= 8)");
Expand All @@ -96,7 +97,7 @@ KOKKOS_INLINE_FUNCTION auto array_layout_from_mapping(const typename MDSpanType:
rank > 7 ? dimension_from_extent(ext, 7) : KOKKOS_IMPL_CTOR_DEFAULT_ARG};
}

template<class MDSpanType, class VM>
template <class MDSpanType, class VM>
KOKKOS_INLINE_FUNCTION auto mapping_from_view_mapping(const VM &view_mapping) {
using mapping_type = typename MDSpanType::mapping_type;
using extents_type = typename mapping_type::extents_type;
Expand Down

0 comments on commit cb3f579

Please sign in to comment.