XGCa
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FFT_wrapper.hpp
Go to the documentation of this file.
1 #ifndef FFT_WRAPPER_HPP
2 #define FFT_WRAPPER_HPP
3 
4 #ifdef USE_FFTW
5 #include <fftw3.h>
6 #endif
7 #include "space_settings.hpp"
8 #include "complex.hpp"
9 
10 class FFTWrapper{
11 #ifdef USE_FFTW
12  fftw_plan plan;
13 #endif
14  View<double*,CLayout,HostType> input;
15  View<Complex*,CLayout,HostType> output;
16 
17  static int get_n_frequencies(int n_points){
18  return (n_points/2 + 1);
19  }
20 
21  public:
22 
24 
25  FFTWrapper(int n_points);
26 
27  void execute(const View<double*,CLayout,HostType>& x, const View<Complex*,CLayout,HostType>& spec) const;
28 
29  void execute_no_openmp(const View<double*,CLayout,HostType>& x, const View<Complex*,CLayout,HostType>& spec) const;
30 
31  void destroy();
32 };
33 
34 #endif
View< Complex *, CLayout, HostType > output
Definition: FFT_wrapper.hpp:15
void destroy()
Definition: FFT_wrapper.cpp:29
Definition: FFT_wrapper.hpp:10
View< double *, CLayout, HostType > input
Definition: FFT_wrapper.hpp:14
static int get_n_frequencies(int n_points)
Definition: FFT_wrapper.hpp:17
void execute_no_openmp(const View< double *, CLayout, HostType > &x, const View< Complex *, CLayout, HostType > &spec) const
Definition: FFT_wrapper.cpp:21
void execute(const View< double *, CLayout, HostType > &x, const View< Complex *, CLayout, HostType > &spec) const
Definition: FFT_wrapper.cpp:13
FFTWrapper()
Definition: FFT_wrapper.hpp:23