Skip to content

Commit

Permalink
fix: based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuuichi Asahi committed Oct 31, 2024
1 parent 1f2c66c commit ad0ccab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions common/src/KokkosFFT_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,16 @@ auto extract_extents(const ViewType& view) {
return extents;
}

template <typename Layout, typename ContainerType>
Layout create_layout(const ContainerType& extents) {
using IntType = KokkosFFT::Impl::base_container_value_type<ContainerType>;
template <typename Layout, typename IntType, std::size_t N>
Layout create_layout(const std::array<IntType, N>& extents) {
static_assert(std::is_integral_v<IntType>,
"create_layout: IntType must be an integral type");
static_assert(std::is_same_v<Layout, Kokkos::LayoutLeft> ||
std::is_same_v<Layout, Kokkos::LayoutRight>,
"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;
}
Expand Down
2 changes: 0 additions & 2 deletions fft/src/KokkosFFT_Plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,6 @@ class Plan {
using LayoutType = typename ManagableInViewType::array_layout;
in_s = ManagableInViewType(
"in_s", KokkosFFT::Impl::create_layout<LayoutType>(m_shape));
// ManagableInViewType const in_s(
// "in_s", KokkosFFT::Impl::create_layout<LayoutType>(m_shape));
KokkosFFT::Impl::crop_or_pad(m_exec_space, in, in_s);
in_tmp = in_s;
} else {
Expand Down

0 comments on commit ad0ccab

Please sign in to comment.