From ad0ccabe76308a4645dd999535e79fe6a8d9725f Mon Sep 17 00:00:00 2001 From: Yuuichi Asahi Date: Fri, 1 Nov 2024 04:35:26 +0900 Subject: [PATCH] fix: based on review --- common/src/KokkosFFT_utils.hpp | 7 +++---- fft/src/KokkosFFT_Plans.hpp | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/common/src/KokkosFFT_utils.hpp b/common/src/KokkosFFT_utils.hpp index f3aa8c49..c0829d7c 100644 --- a/common/src/KokkosFFT_utils.hpp +++ b/common/src/KokkosFFT_utils.hpp @@ -209,9 +209,8 @@ auto extract_extents(const ViewType& view) { return extents; } -template -Layout create_layout(const ContainerType& extents) { - using IntType = KokkosFFT::Impl::base_container_value_type; +template +Layout create_layout(const std::array& extents) { static_assert(std::is_integral_v, "create_layout: IntType must be an integral type"); static_assert(std::is_same_v || @@ -219,7 +218,7 @@ Layout create_layout(const ContainerType& extents) { "create_layout: Layout must be either Kokkos::LayoutLeft or " "Kokkos::LayoutRight."); Layout layout; - const std::size_t N = extents.size(); + // const std::size_t N = extents.size(); std::copy_n(extents.begin(), N, layout.dimension); return layout; } diff --git a/fft/src/KokkosFFT_Plans.hpp b/fft/src/KokkosFFT_Plans.hpp index 68e2c1ec..a1892338 100644 --- a/fft/src/KokkosFFT_Plans.hpp +++ b/fft/src/KokkosFFT_Plans.hpp @@ -321,8 +321,6 @@ class Plan { using LayoutType = typename ManagableInViewType::array_layout; in_s = ManagableInViewType( "in_s", KokkosFFT::Impl::create_layout(m_shape)); - // ManagableInViewType const in_s( - // "in_s", KokkosFFT::Impl::create_layout(m_shape)); KokkosFFT::Impl::crop_or_pad(m_exec_space, in, in_s); in_tmp = in_s; } else {