From 9983aa178309b2be741e81fe09fee419f2994f8d Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 5 Sep 2015 21:43:26 +0200 Subject: [PATCH] Added more automatic type conversions --- src/fourier/fft/fftw_calls.hpp | 2 ++ src/fourier/fft/fftw_calls_mpi.hpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fourier/fft/fftw_calls.hpp b/src/fourier/fft/fftw_calls.hpp index b627cf4..2301b52 100644 --- a/src/fourier/fft/fftw_calls.hpp +++ b/src/fourier/fft/fftw_calls.hpp @@ -70,6 +70,8 @@ public: \ static void execute(plan_type p) { prefix ## _execute(p); } \ static void execute_r2c(plan_type p, real_type *in, complex_type *out) { prefix ## _execute_dft_r2c(p, in, out); } \ static void execute_c2r(plan_type p, complex_type *in, real_type *out) { prefix ## _execute_dft_c2r(p, in, out); } \ + static void execute_r2c(plan_type p, real_type *in, std::complex *out) { prefix ## _execute_dft_r2c(p, in, (complex_type*)out); } \ + static void execute_c2r(plan_type p, std::complex *in, real_type *out) { prefix ## _execute_dft_c2r(p, (complex_type*) in, out); } \ static plan_type plan_dft_r2c_2d(int Nx, int Ny, \ real_type *in, complex_type *out, \ unsigned flags) \ diff --git a/src/fourier/fft/fftw_calls_mpi.hpp b/src/fourier/fft/fftw_calls_mpi.hpp index 675db5a..34df3d3 100644 --- a/src/fourier/fft/fftw_calls_mpi.hpp +++ b/src/fourier/fft/fftw_calls_mpi.hpp @@ -44,7 +44,8 @@ public: \ \ static void execute(plan_type p) { prefix ## _execute(p); } \ static void execute_r2c(plan_type p, real_type *in, complex_type *out) { prefix ## _mpi_execute_dft_r2c(p, in, out); } \ - static void execute_c2r(plan_type p, complex_type *in, real_type *out) { prefix ## _mpi_execute_dft_c2r(p, in, out); } \ + static void execute_c2r(plan_type p, std::complex *in, real_type *out) { prefix ## _mpi_execute_dft_c2r(p, (complex_type*)in, out); } \ + static void execute_r2c(plan_type p, real_type *in, std::compelex *out) { prefix ## _mpi_execute_dft_r2c(p, in, (complex_type*)out); } \ \ static plan_type plan_dft_r2c_2d(int Nx, int Ny, \ real_type *in, complex_type *out, \