From f65b97b96ec4111807222fd95057813a454a2bea Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Sat, 5 Apr 2025 20:50:12 -0300 Subject: Enable multithreaded FFTW with openmp --- fourier.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fourier.cpp') diff --git a/fourier.cpp b/fourier.cpp index 0c22637..c2ed600 100644 --- a/fourier.cpp +++ b/fourier.cpp @@ -25,6 +25,8 @@ Real ddf(Real λ, unsigned p, unsigned s, Real q) { } FourierTransform::FourierTransform(unsigned n, Real Δω, Real Δτ, unsigned flags) : a(2 * n), â(n + 1), Δω(Δω), Δτ(Δτ) { + fftw_init_threads(); + fftw_plan_with_nthreads(FFTW_THREADS); fftw_import_wisdom_from_filename("fftw.wisdom"); plan_r2c = fftw_plan_dft_r2c_1d(2 * n, a.data(), reinterpret_cast(â.data()), flags); plan_c2r = fftw_plan_dft_c2r_1d(2 * n, reinterpret_cast(â.data()), a.data(), flags); -- cgit v1.2.3-70-g09d2