From 85f2ebc6e94a820535e1c1568c41204337d9c21f Mon Sep 17 00:00:00 2001 From: Yuuichi Asahi Date: Mon, 8 Jul 2024 18:33:53 +0900 Subject: [PATCH] rename roll_impl and coefficients_impl --- common/src/KokkosFFT_Helpers.hpp | 16 ++++++++-------- common/src/KokkosFFT_normalization.hpp | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/common/src/KokkosFFT_Helpers.hpp b/common/src/KokkosFFT_Helpers.hpp index 4f53ef7c..6b69efa4 100644 --- a/common/src/KokkosFFT_Helpers.hpp +++ b/common/src/KokkosFFT_Helpers.hpp @@ -38,10 +38,10 @@ auto get_shift(const ViewType& inout, axis_type _axes, int direction = 1) { } template -void roll_impl(const ExecutionSpace& exec_space, ViewType& inout, - axis_type<1> shift, axis_type<1>) { +void roll(const ExecutionSpace& exec_space, ViewType& inout, axis_type<1> shift, + axis_type<1>) { // Last parameter is ignored but present for keeping the interface consistent - static_assert(ViewType::rank() == 1, "roll_impl: Rank of View must be 1."); + static_assert(ViewType::rank() == 1, "roll: Rank of View must be 1."); std::size_t n0 = inout.extent(0); ViewType tmp("tmp", n0); @@ -68,10 +68,10 @@ void roll_impl(const ExecutionSpace& exec_space, ViewType& inout, } template -void roll_impl(const ExecutionSpace& exec_space, ViewType& inout, - axis_type<2> shift, axis_type axes) { +void roll(const ExecutionSpace& exec_space, ViewType& inout, axis_type<2> shift, + axis_type axes) { constexpr int DIM0 = 2; - static_assert(ViewType::rank() == DIM0, "roll_impl: Rank of View must be 2."); + static_assert(ViewType::rank() == DIM0, "roll: Rank of View must be 2."); int n0 = inout.extent(0), n1 = inout.extent(1); ViewType tmp("tmp", n0, n1); @@ -145,7 +145,7 @@ void fftshift_impl(const ExecutionSpace& exec_space, ViewType& inout, "fftshift_impl: Rank of View must be larger thane " "or equal to the Rank of shift axes."); auto shift = get_shift(inout, axes); - roll_impl(exec_space, inout, shift, axes); + roll(exec_space, inout, shift, axes); } template @@ -165,7 +165,7 @@ void ifftshift_impl(const ExecutionSpace& exec_space, ViewType& inout, "ifftshift_impl: Rank of View must be larger " "thane or equal to the Rank of shift axes."); auto shift = get_shift(inout, axes, -1); - roll_impl(exec_space, inout, shift, axes); + roll(exec_space, inout, shift, axes); } } // namespace Impl } // namespace KokkosFFT diff --git a/common/src/KokkosFFT_normalization.hpp b/common/src/KokkosFFT_normalization.hpp index 90f6ef65..b57e974d 100644 --- a/common/src/KokkosFFT_normalization.hpp +++ b/common/src/KokkosFFT_normalization.hpp @@ -24,8 +24,8 @@ void normalize_impl(const ExecutionSpace& exec_space, ViewType& inout, } template -auto coefficients_impl(ViewType, Direction direction, - Normalization normalization, std::size_t fft_size) { +auto get_coefficients(ViewType, Direction direction, + Normalization normalization, std::size_t fft_size) { using value_type = KokkosFFT::Impl::real_type_t; value_type coef = 1; @@ -63,7 +63,7 @@ void normalize(const ExecutionSpace& exec_space, ViewType& inout, Direction direction, Normalization normalization, std::size_t fft_size) { auto [coef, to_normalize] = - coefficients_impl(inout, direction, normalization, fft_size); + get_coefficients(inout, direction, normalization, fft_size); if (to_normalize) normalize_impl(exec_space, inout, coef); }