From d38fbb103ad89d7c48ae33feda49decff3c68853 Mon Sep 17 00:00:00 2001 From: Yuuichi Asahi Date: Wed, 30 Oct 2024 19:55:42 +0900 Subject: [PATCH] fix: format --- common/src/KokkosFFT_utils.hpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/common/src/KokkosFFT_utils.hpp b/common/src/KokkosFFT_utils.hpp index d6e2aaa..722c60c 100644 --- a/common/src/KokkosFFT_utils.hpp +++ b/common/src/KokkosFFT_utils.hpp @@ -210,8 +210,7 @@ auto extract_extents(const ViewType& view) { } template -auto shrank_slicers(const InViewType& in, - const OutViewType& out) { +auto shrank_slicers(const InViewType& in, const OutViewType& out) { static_assert( KokkosFFT::Impl::have_same_rank_v, "shrank_slicers: InViewType and OutViewType must have the same rank."); @@ -222,20 +221,19 @@ auto shrank_slicers(const InViewType& in, for (std::size_t i = 0; i < rank; i++) { extents.at(i) = std::min(in.extent(i), out.extent(i)); } - - + if constexpr (rank == 1) { - using slicers_type = std::tuple>; + using slicers_type = std::tuple>; slicers_type slicers = {Kokkos::make_pair(0, extents.at(0))}; return slicers; } else if constexpr (rank == 2) { - using slicers_type = std::tuple, + using slicers_type = std::tuple, Kokkos::pair>; slicers_type slicers = {Kokkos::make_pair(0, extents.at(0)), Kokkos::make_pair(0, extents.at(1))}; return slicers; } else if constexpr (rank == 3) { - using slicers_type = std::tuple, + using slicers_type = std::tuple, Kokkos::pair, Kokkos::pair>; slicers_type slicers = {Kokkos::make_pair(0, extents.at(0)), @@ -243,7 +241,7 @@ auto shrank_slicers(const InViewType& in, Kokkos::make_pair(0, extents.at(2))}; return slicers; } else if constexpr (rank == 4) { - using slicers_type = std::tuple, + using slicers_type = std::tuple, Kokkos::pair, Kokkos::pair, Kokkos::pair>; @@ -253,7 +251,7 @@ auto shrank_slicers(const InViewType& in, Kokkos::make_pair(0, extents.at(3))}; return slicers; } else if constexpr (rank == 5) { - using slicers_type = std::tuple, + using slicers_type = std::tuple, Kokkos::pair, Kokkos::pair, Kokkos::pair, @@ -265,7 +263,7 @@ auto shrank_slicers(const InViewType& in, Kokkos::make_pair(0, extents.at(4))}; return slicers; } else if constexpr (rank == 6) { - using slicers_type = std::tuple, + using slicers_type = std::tuple, Kokkos::pair, Kokkos::pair, Kokkos::pair, @@ -279,7 +277,7 @@ auto shrank_slicers(const InViewType& in, Kokkos::make_pair(0, extents.at(5))}; return slicers; } else if constexpr (rank == 7) { - using slicers_type = std::tuple, + using slicers_type = std::tuple, Kokkos::pair, Kokkos::pair, Kokkos::pair, @@ -295,7 +293,7 @@ auto shrank_slicers(const InViewType& in, Kokkos::make_pair(0, extents.at(6))}; return slicers; } else { - using slicers_type = std::tuple, + using slicers_type = std::tuple, Kokkos::pair, Kokkos::pair, Kokkos::pair,