8 #ifndef ABLASTR_ANYFFT_H_
9 #define ABLASTR_ANYFFT_H_
11 #ifdef ABLASTR_USE_FFT
12 # include <AMReX_Config.H>
15 # if defined(AMREX_USE_CUDA)
17 # elif defined(AMREX_USE_HIP)
18 # if __has_include(<rocfft/rocfft.h>)
19 # include <rocfft/rocfft.h>
48 #ifdef ABLASTR_USE_FFT
53 # if defined(AMREX_USE_CUDA)
54 # ifdef AMREX_USE_FLOAT
57 using Complex = cuDoubleComplex;
59 # elif defined(AMREX_USE_HIP)
60 # ifdef AMREX_USE_FLOAT
66 # ifdef AMREX_USE_FLOAT
76 # if defined(AMREX_USE_CUDA)
77 using VendorFFTPlan = cufftHandle;
78 # elif defined(AMREX_USE_HIP)
79 using VendorFFTPlan = rocfft_plan;
81 # ifdef AMREX_USE_FLOAT
82 using VendorFFTPlan = fftwf_plan;
84 using VendorFFTPlan = fftw_plan;
91 enum struct direction {R2C, C2R};
97 amrex::Real* m_real_array;
116 Complex* complex_array, direction dir,
int dim);
126 void Execute(FFTplan& fft_plan);
FFTplan CreatePlan(const amrex::IntVect &real_size, amrex::Real *const real_array, Complex *const complex_array, const direction dir, const int dim)
Definition: WrapCuFFT.cpp:30
void DestroyPlan(FFTplan &fft_plan)
Definition: WrapCuFFT.cpp:72
void cleanup()
Definition: WrapCuFFT.cpp:18
void Execute(FFTplan &fft_plan)
Definition: WrapCuFFT.cpp:78
void setup()
Definition: WrapCuFFT.cpp:16