18 #ifndef itkFFTWCommonExtended_h
19 #define itkFFTWCommonExtended_h
21 #if defined(ITK_USE_FFTWF) || defined(ITK_USE_FFTWD)
22 # if defined(ITK_USE_CUFFTW)
44 template <
typename TPixel>
54 #if defined(ITK_USE_FFTWF)
68 # ifndef ITK_USE_CUFFTW
70 fftwf_plan_with_nthreads(threads);
72 PlanType plan = fftwf_plan_dft_c2r_1d(n, in, out, flags);
81 [[maybe_unused]]
int threads = 1)
83 # ifndef ITK_USE_CUFFTW
85 fftwf_plan_with_nthreads(threads);
87 PlanType plan = fftwf_plan_dft_c2r_2d(nx, ny, in, out, flags);
97 [[maybe_unused]]
int threads = 1)
99 # ifndef ITK_USE_CUFFTW
101 fftwf_plan_with_nthreads(threads);
103 PlanType plan = fftwf_plan_dft_c2r_3d(nx, ny, nz, in, out, flags);
112 [[maybe_unused]]
int threads = 1)
114 # ifndef ITK_USE_CUFFTW
116 fftwf_plan_with_nthreads(threads);
118 PlanType plan = fftwf_plan_dft_c2r(rank, n, in, out, flags);
125 # ifndef ITK_USE_CUFFTW
127 fftwf_plan_with_nthreads(threads);
129 PlanType plan = fftwf_plan_dft_r2c_1d(n, in, out, flags);
138 [[maybe_unused]]
int threads = 1)
140 # ifndef ITK_USE_CUFFTW
142 fftwf_plan_with_nthreads(threads);
144 PlanType plan = fftwf_plan_dft_r2c_2d(nx, ny, in, out, flags);
154 [[maybe_unused]]
int threads = 1)
156 # ifndef ITK_USE_CUFFTW
158 fftwf_plan_with_nthreads(threads);
160 PlanType plan = fftwf_plan_dft_r2c_3d(nx, ny, nz, in, out, flags);
169 [[maybe_unused]]
int threads = 1)
171 # ifndef ITK_USE_CUFFTW
173 fftwf_plan_with_nthreads(threads);
175 PlanType plan = fftwf_plan_dft_r2c(rank, n, in, out, flags);
184 [[maybe_unused]]
int threads = 1)
186 # ifndef ITK_USE_CUFFTW
188 fftwf_plan_with_nthreads(threads);
190 PlanType plan = fftwf_plan_dft_1d(n, in, out, sign, flags);
203 fftwf_destroy_plan(p);
210 #if defined(ITK_USE_FFTWD)
223 # ifndef ITK_USE_CUFFTW
225 fftw_plan_with_nthreads(threads);
227 PlanType plan = fftw_plan_dft_c2r_1d(n, in, out, flags);
236 [[maybe_unused]]
int threads = 1)
238 # ifndef ITK_USE_CUFFTW
240 fftw_plan_with_nthreads(threads);
242 PlanType plan = fftw_plan_dft_c2r_2d(nx, ny, in, out, flags);
252 [[maybe_unused]]
int threads = 1)
254 # ifndef ITK_USE_CUFFTW
256 fftw_plan_with_nthreads(threads);
258 PlanType plan = fftw_plan_dft_c2r_3d(nx, ny, nz, in, out, flags);
267 [[maybe_unused]]
int threads = 1)
269 # ifndef ITK_USE_CUFFTW
271 fftw_plan_with_nthreads(threads);
273 PlanType plan = fftw_plan_dft_c2r(rank, n, in, out, flags);
280 # ifndef ITK_USE_CUFFTW
282 fftw_plan_with_nthreads(threads);
284 PlanType plan = fftw_plan_dft_r2c_1d(n, in, out, flags);
294 [[maybe_unused]]
int threads = 1)
296 # ifndef ITK_USE_CUFFTW
298 fftw_plan_with_nthreads(threads);
300 PlanType plan = fftw_plan_dft_r2c_2d(nx, ny, in, out, flags);
311 [[maybe_unused]]
int threads = 1)
313 # ifndef ITK_USE_CUFFTW
315 fftw_plan_with_nthreads(threads);
317 PlanType plan = fftw_plan_dft_r2c_3d(nx, ny, nz, in, out, flags);
327 [[maybe_unused]]
int threads = 1)
329 # ifndef ITK_USE_CUFFTW
331 fftw_plan_with_nthreads(threads);
333 PlanType plan = fftw_plan_dft_r2c(rank, n, in, out, flags);
342 [[maybe_unused]]
int threads = 1)
344 # ifndef ITK_USE_CUFFTW
346 fftw_plan_with_nthreads(threads);
348 PlanType plan = fftw_plan_dft_1d(n, in, out, sign, flags);
360 fftw_destroy_plan(p);