I am having trouble figuring out what is the order in which CUDA returns a 1D forward FFT transform. Specifically I am looking for the Nyquist frequency.
For a real to complex forward transform, this is how FFTW returns frequencies:
Ofcourse CUDA takes care of the symmetry and only returns half of the frequencies in this order:
But where is the nuquist frequency?
I made a simple test for an array of size Nx=8 with inputs of
This is how FFTW returns the fft(a) in the above mentioned order:
-4.0000 + 9.6569i
-4.0000 + 4.0000i
-4.0000 + 1.6569i
and this is how CUDA returns it:
28 0 i
-4+ 9.65685 i
-4+ 4 i
-4+ 1.65685 i
The next elements value in CUDA is 0, and not -4. So my question is which element of the output contains the nyquist frequency?