OpenStructure
Loading...
Searching...
No Matches
fftw_helper.hh
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// This file is part of the OpenStructure project <www.openstructure.org>
3//
4// Copyright (C) 2008-2020 by the OpenStructure authors
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License as published by the Free
8// Software Foundation; either version 3.0 of the License, or (at your option)
9// any later version.
10// This library is distributed in the hope that it will be useful, but WITHOUT
11// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13// details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this library; if not, write to the Free Software Foundation, Inc.,
17// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18//------------------------------------------------------------------------------
19/*
20Author: Juergen Haas
21*/
22#ifndef IMG_ALG_FFTW_HELPER_HH
23#define IMG_ALG_FFTW_HELPER_HH
24
25#include <ost/config.hh>
26
27
28#if OST_DOUBLE_PRECISION
29#define OST_FFTW_fftw_complex fftw_complex
30#define OST_FFTW_fftw_plan fftw_plan
31#define OST_FFTW_fftw_execute fftw_execute
32#define OST_FFTW_fftw_destroy_plan fftw_destroy_plan
33#define OST_FFTW_fftw_complex fftw_complex
34#define OST_FFTW_fftw_plan fftw_plan
35#define OST_FFTW_fftw_execute fftw_execute
36#define OST_FFTW_fftw_destroy_plan fftw_destroy_plan
37#define OST_FFTW_fftw_complex fftw_complex
38#define OST_FFTW_fftw_plan fftw_plan
39#define OST_FFTW_fftw_execute fftw_execute
40#define OST_FFTW_fftw_destroy_plan fftw_destroy_plan
41#define OST_FFTW_fftw_complex fftw_complex
42#define OST_FFTW_fftw_plan fftw_plan
43#define OST_FFTW_fftw_execute fftw_execute
44#define OST_FFTW_fftw_destroy_plan fftw_destroy_plan
45#define OST_FFTW_fftw_plan_dft_r2c fftw_plan_dft_r2c
46#define OST_FFTW_fftw_plan_dft fftw_plan_dft
47#define OST_FFTW_fftw_plan_dft_c2r fftw_plan_dft_c2r
48#define OST_FFTW_fftw_plan_many_dft fftw_plan_many_dft
49#else
50#define OST_FFTW_fftw_complex fftwf_complex
51#define OST_FFTW_fftw_plan fftwf_plan
52#define OST_FFTW_fftw_execute fftwf_execute
53#define OST_FFTW_fftw_destroy_plan fftwf_destroy_plan
54#define OST_FFTW_fftw_complex fftwf_complex
55#define OST_FFTW_fftw_plan fftwf_plan
56#define OST_FFTW_fftw_execute fftwf_execute
57#define OST_FFTW_fftw_destroy_plan fftwf_destroy_plan
58#define OST_FFTW_fftw_complex fftwf_complex
59#define OST_FFTW_fftw_plan fftwf_plan
60#define OST_FFTW_fftw_execute fftwf_execute
61#define OST_FFTW_fftw_destroy_plan fftwf_destroy_plan
62#define OST_FFTW_fftw_complex fftwf_complex
63#define OST_FFTW_fftw_plan fftwf_plan
64#define OST_FFTW_fftw_execute fftwf_execute
65#define OST_FFTW_fftw_destroy_plan fftwf_destroy_plan
66#define OST_FFTW_fftw_plan_dft_r2c fftwf_plan_dft_r2c
67#define OST_FFTW_fftw_plan_dft fftwf_plan_dft
68#define OST_FFTW_fftw_plan_dft_c2r fftwf_plan_dft_c2r
69#define OST_FFTW_fftw_plan_many_dft fftwf_plan_many_dft
70#endif
71
72#if OST_FFT_USE_THREADS
73 #if OST_DOUBLE_PRECISION
74 #define OST_FFTW_fftw_init_threads fftw_init_threads
75 #define OST_FFTW_fftw_cleanup fftw_cleanup_threads
76 #define OST_FFTW_fftw_plan_with_nthreads fftw_plan_with_nthreads
77 #else
78 #define OST_FFTW_fftw_init_threads fftwf_init_threads
79 #define OST_FFTW_fftw_cleanup fftwf_cleanup_threads
80 #define OST_FFTW_fftw_plan_with_nthreads fftwf_plan_with_nthreads
81 #endif
82#else
83 void fftw_noop(unsigned int i=0){}
84 #define OST_FFTW_fftw_init_threads fftw_noop
85 #define OST_FFTW_fftw_plan_with_nthreads fftw_noop
86 #if OST_DOUBLE_PRECISION
87 #define OST_FFTW_fftw_cleanup fftw_cleanup
88 #else
89 #define OST_FFTW_fftw_cleanup fftwf_cleanup
90 #endif
91#endif
92
93#endif
void fftw_noop(unsigned int i=0)