From f64a013a8528d8a3bc552d4300105190e078d37a Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Tue, 8 Oct 2024 19:49:47 +0200 Subject: [PATCH] Rename complex number to avoid confusion with the imaginary unit (#155) --- examples/01_1DFFT/01_1DFFT.cpp | 6 +++--- examples/02_2DFFT/02_2DFFT.cpp | 6 +++--- examples/03_NDFFT/03_NDFFT.cpp | 6 +++--- examples/04_batchedFFT/04_batchedFFT.cpp | 6 +++--- examples/05_1DFFT_HOST_DEVICE/05_1DFFT_HOST_DEVICE.cpp | 6 +++--- examples/06_1DFFT_reuse_plans/06_1DFFT_reuse_plans.cpp | 6 +++--- examples/07_unmanaged_views/07_unmanaged_views.cpp | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/01_1DFFT/01_1DFFT.cpp b/examples/01_1DFFT/01_1DFFT.cpp index f71dd47a..34bf79aa 100644 --- a/examples/01_1DFFT/01_1DFFT.cpp +++ b/examples/01_1DFFT/01_1DFFT.cpp @@ -15,7 +15,7 @@ int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); { constexpr int n0 = 128; - const Kokkos::complex I(1.0, 1.0); + const Kokkos::complex z(1.0, 1.0); // 1D C2C FFT (Forward and Backward) View1D > xc2c("xc2c", n0); @@ -24,7 +24,7 @@ int main(int argc, char* argv[]) { Kokkos::Random_XorShift64_Pool<> random_pool(12345); execution_space exec; - Kokkos::fill_random(exec, xc2c, random_pool, I); + Kokkos::fill_random(exec, xc2c, random_pool, z); exec.fence(); KokkosFFT::fft(exec, xc2c, xc2c_hat); @@ -43,7 +43,7 @@ int main(int argc, char* argv[]) { // 1D C2R FFT View1D > xc2r("xr2c_hat", n0 / 2 + 1); View1D xc2r_hat("xc2r", n0); - Kokkos::fill_random(exec, xc2r, random_pool, I); + Kokkos::fill_random(exec, xc2r, random_pool, z); exec.fence(); KokkosFFT::irfft(exec, xc2r, xc2r_hat); diff --git a/examples/02_2DFFT/02_2DFFT.cpp b/examples/02_2DFFT/02_2DFFT.cpp index c90920a0..04d39b54 100644 --- a/examples/02_2DFFT/02_2DFFT.cpp +++ b/examples/02_2DFFT/02_2DFFT.cpp @@ -15,7 +15,7 @@ int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); { constexpr int n0 = 128, n1 = 128; - const Kokkos::complex I(1.0, 1.0); + const Kokkos::complex z(1.0, 1.0); // 2D C2C FFT (Forward and Backward) View2D > xc2c("xc2c", n0, n1); @@ -24,7 +24,7 @@ int main(int argc, char* argv[]) { Kokkos::Random_XorShift64_Pool<> random_pool(12345); execution_space exec; - Kokkos::fill_random(exec, xc2c, random_pool, I); + Kokkos::fill_random(exec, xc2c, random_pool, z); exec.fence(); KokkosFFT::fft2(exec, xc2c, xc2c_hat); @@ -43,7 +43,7 @@ int main(int argc, char* argv[]) { // 2D C2R FFT View2D > xc2r("xr2c_hat", n0, n1 / 2 + 1); View2D xc2r_hat("xc2r", n0, n1); - Kokkos::fill_random(exec, xc2r, random_pool, I); + Kokkos::fill_random(exec, xc2r, random_pool, z); exec.fence(); KokkosFFT::irfft2(exec, xc2r, xc2r_hat); diff --git a/examples/03_NDFFT/03_NDFFT.cpp b/examples/03_NDFFT/03_NDFFT.cpp index 65b70e32..151ba0f0 100644 --- a/examples/03_NDFFT/03_NDFFT.cpp +++ b/examples/03_NDFFT/03_NDFFT.cpp @@ -17,7 +17,7 @@ int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); { constexpr int n0 = 128, n1 = 128, n2 = 16; - const Kokkos::complex I(1.0, 1.0); + const Kokkos::complex z(1.0, 1.0); // 3D C2C FFT (Forward and Backward) View3D > xc2c("xc2c", n0, n1, n2); @@ -26,7 +26,7 @@ int main(int argc, char* argv[]) { Kokkos::Random_XorShift64_Pool<> random_pool(12345); execution_space exec; - Kokkos::fill_random(exec, xc2c, random_pool, I); + Kokkos::fill_random(exec, xc2c, random_pool, z); exec.fence(); KokkosFFT::fftn(exec, xc2c, xc2c_hat, axis_type<3>{-3, -2, -1}); @@ -45,7 +45,7 @@ int main(int argc, char* argv[]) { // 3D C2R FFT View3D > xc2r("xr2c_hat", n0, n1, n2 / 2 + 1); View3D xc2r_hat("xc2r", n0, n1, n2); - Kokkos::fill_random(exec, xc2r, random_pool, I); + Kokkos::fill_random(exec, xc2r, random_pool, z); exec.fence(); KokkosFFT::irfftn(exec, xc2r, xc2r_hat, axis_type<3>{-3, -2, -1}); diff --git a/examples/04_batchedFFT/04_batchedFFT.cpp b/examples/04_batchedFFT/04_batchedFFT.cpp index fdfed0fb..f354ab3e 100644 --- a/examples/04_batchedFFT/04_batchedFFT.cpp +++ b/examples/04_batchedFFT/04_batchedFFT.cpp @@ -15,7 +15,7 @@ int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); { constexpr int n0 = 128, n1 = 128, n2 = 16; - const Kokkos::complex I(1.0, 1.0); + const Kokkos::complex z(1.0, 1.0); // 1D batched C2C FFT (Forward and Backward) View3D > xc2c("xc2c", n0, n1, n2); @@ -24,7 +24,7 @@ int main(int argc, char* argv[]) { Kokkos::Random_XorShift64_Pool<> random_pool(12345); execution_space exec; - Kokkos::fill_random(exec, xc2c, random_pool, I); + Kokkos::fill_random(exec, xc2c, random_pool, z); exec.fence(); KokkosFFT::fft(exec, xc2c, xc2c_hat, KokkosFFT::Normalization::backward, @@ -46,7 +46,7 @@ int main(int argc, char* argv[]) { // 1D batched C2R FFT View3D > xc2r("xr2c_hat", n0, n1, n2 / 2 + 1); View3D xc2r_hat("xc2r", n0, n1, n2); - Kokkos::fill_random(exec, xc2r, random_pool, I); + Kokkos::fill_random(exec, xc2r, random_pool, z); exec.fence(); KokkosFFT::irfft(exec, xc2r, xc2r_hat, KokkosFFT::Normalization::backward, diff --git a/examples/05_1DFFT_HOST_DEVICE/05_1DFFT_HOST_DEVICE.cpp b/examples/05_1DFFT_HOST_DEVICE/05_1DFFT_HOST_DEVICE.cpp index cb9ce11f..0841d093 100644 --- a/examples/05_1DFFT_HOST_DEVICE/05_1DFFT_HOST_DEVICE.cpp +++ b/examples/05_1DFFT_HOST_DEVICE/05_1DFFT_HOST_DEVICE.cpp @@ -18,7 +18,7 @@ int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); { constexpr int n0 = 128; - const Kokkos::complex I(1.0, 1.0); + const Kokkos::complex z(1.0, 1.0); // 1D C2C FFT (Forward and Backward) View1D > xc2c("xc2c", n0); @@ -27,7 +27,7 @@ int main(int argc, char* argv[]) { Kokkos::Random_XorShift64_Pool<> random_pool(12345); execution_space exec; - Kokkos::fill_random(exec, xc2c, random_pool, I); + Kokkos::fill_random(exec, xc2c, random_pool, z); exec.fence(); KokkosFFT::fft(exec, xc2c, xc2c_hat); @@ -46,7 +46,7 @@ int main(int argc, char* argv[]) { // 1D C2R FFT View1D > xc2r("xr2c_hat", n0 / 2 + 1); View1D xc2r_hat("xc2r", n0); - Kokkos::fill_random(exec, xc2r, random_pool, I); + Kokkos::fill_random(exec, xc2r, random_pool, z); exec.fence(); KokkosFFT::irfft(exec, xc2r, xc2r_hat); diff --git a/examples/06_1DFFT_reuse_plans/06_1DFFT_reuse_plans.cpp b/examples/06_1DFFT_reuse_plans/06_1DFFT_reuse_plans.cpp index a8d06cb3..5f2ebb07 100644 --- a/examples/06_1DFFT_reuse_plans/06_1DFFT_reuse_plans.cpp +++ b/examples/06_1DFFT_reuse_plans/06_1DFFT_reuse_plans.cpp @@ -15,7 +15,7 @@ int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); { constexpr int n0 = 128; - const Kokkos::complex I(1.0, 1.0); + const Kokkos::complex z(1.0, 1.0); // 1D C2C FFT (Forward and Backward) View1D > xc2c("xc2c", n0); @@ -24,7 +24,7 @@ int main(int argc, char* argv[]) { Kokkos::Random_XorShift64_Pool<> random_pool(12345); execution_space exec; - Kokkos::fill_random(exec, xc2c, random_pool, I); + Kokkos::fill_random(exec, xc2c, random_pool, z); exec.fence(); int axis = -1; @@ -52,7 +52,7 @@ int main(int argc, char* argv[]) { // 1D C2R FFT View1D > xc2r("xc2r_hat", n0 / 2 + 1); View1D xc2r_hat("xc2r", n0); - Kokkos::fill_random(exec, xc2r, random_pool, I); + Kokkos::fill_random(exec, xc2r, random_pool, z); exec.fence(); KokkosFFT::Impl::Plan irfft_plan(exec, xc2r, xc2r_hat, diff --git a/examples/07_unmanaged_views/07_unmanaged_views.cpp b/examples/07_unmanaged_views/07_unmanaged_views.cpp index 50580caa..d13bc2f8 100644 --- a/examples/07_unmanaged_views/07_unmanaged_views.cpp +++ b/examples/07_unmanaged_views/07_unmanaged_views.cpp @@ -27,7 +27,7 @@ int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); { constexpr int n0 = 128, n1 = 128, n2 = 16; - const Kokkos::complex I(1.0, 1.0); + const Kokkos::complex z(1.0, 1.0); shape_type<3> shape; shape[0] = n0; @@ -55,7 +55,7 @@ int main(int argc, char* argv[]) { n0, n1, n2); Kokkos::Random_XorShift64_Pool<> random_pool(12345); execution_space exec; - Kokkos::fill_random(exec, xc2c, random_pool, I); + Kokkos::fill_random(exec, xc2c, random_pool, z); exec.fence(); KokkosFFT::fftn(exec, xc2c, xc2c_hat, axis_type<3>{-3, -2, -1},