diff --git a/core/src/View/MDSpan/Kokkos_MDSpan_Layout.hpp b/core/src/View/MDSpan/Kokkos_MDSpan_Layout.hpp index 7e97096a38c..2fb30aa5292 100644 --- a/core/src/View/MDSpan/Kokkos_MDSpan_Layout.hpp +++ b/core/src/View/MDSpan/Kokkos_MDSpan_Layout.hpp @@ -102,12 +102,18 @@ KOKKOS_INLINE_FUNCTION auto mapping_from_view_mapping(const VM &view_mapping) { Kokkos::layout_stride>) { return mapping_type(extents_from_view_mapping(view_mapping), strides); - } else if constexpr (VM::Rank > 1 && std::is_same_v>) { - return mapping_type(extents_from_view_mapping(view_mapping), strides[1]); - } else if constexpr (VM::Rank > 1 && std::is_same_v>) { - return mapping_type(extents_from_view_mapping(view_mapping), strides[VM::Rank - 2]); + } else if constexpr (VM::Rank > 1 && + std::is_same_v>) { + return mapping_type(extents_from_view_mapping(view_mapping), + strides[1]); + } else if constexpr (VM::Rank > 1 && + std::is_same_v>) { + return mapping_type(extents_from_view_mapping(view_mapping), + strides[VM::Rank - 2]); } else { return mapping_type(extents_from_view_mapping(view_mapping)); } diff --git a/core/unit_test/TestMDSpanConversion.hpp b/core/unit_test/TestMDSpanConversion.hpp index 6d9ccdedaf9..b5c4ba14fc9 100644 --- a/core/unit_test/TestMDSpanConversion.hpp +++ b/core/unit_test/TestMDSpanConversion.hpp @@ -98,9 +98,9 @@ struct TestViewMDSpanConversion { constexpr bool is_strided_layout = std::is_same_v; - if constexpr ( !is_strided_layout ) - { - static_assert(natural_mdspan_type::mapping_type::padding_value == Kokkos::dynamic_extent); + if constexpr (!is_strided_layout) { + static_assert(natural_mdspan_type::mapping_type::padding_value == + Kokkos::dynamic_extent); } // test conversion operator to natural mdspan {