I have some code that performs forward and inverse FFTs with FFTW. I'm working on porting some pieces of the code to use NVIDIA CUFFT.
To verify that my CUFFT-based pieces are working properly, I'd like to diff the CUFFT output with the reference FFTW output for a forward FFT. One challenge in implementing this diff is the complex
data structure in the two libraries: CUFFT has cufftComplex
, and FFTW has fftwf_complex
.
Are cufftComplex
and fftwf_complex
interchangable (e.g. can I cast the CUFFT data type to be compatible with FFTW)? Or, do I need to do something to convert between the two data types?