CUFFT output frequency range Shouldn't it be 0...2*Pi?

Sorry for the cross-post.

Let a = a complex sine with frequency fs/4, ie:
a = [1, j, -1, -j, 1, j, -1, -j];

Let b = a complex sine with frequency negative fs/4, ie:
b = [-j, -1, j, 1, -j, -1, j, 1];

Doing an FFT with MATLAB puts these two peaks at fs/4 and 3*fs/4, as expected, ie:
abs(fft( a )) = [0 0 8 0 0 0 0 0]
and
abs(fft( b )) = [0 0 0 0 0 0 8 0]

By contrast, CUFFT puts both peaks at more or less the same position. This leads me to believe that MATLAB complex ffts go from 0…2*Pi, whereas CUFFT’s only go from 0…Pi (and mirrors stuff above Pi back down onto the spectrum). Am I correct? If so, shouldn’t CUFFT have the same behavior as MATLAB in this case?

Thanks for any insight.

I don’t understand your question.

This is the output from CUFFT for your first transform on a:

Input data :

 0      1.000000      0.000000
 1      0.000000      1.000000
 2     -1.000000      0.000000
 3      0.000000     -1.000000
 4      1.000000      0.000000
 5      0.000000      1.000000
 6     -1.000000      0.000000
 7      0.000000     -1.000000

forward :

Output FFT Coefficients:

 0      0.000000      0.000000
 1      0.000000      0.000000
 2      8.000000      0.000000
 3      0.000000      0.000000
 4      0.000000      0.000000
 5      0.000000      0.000000
 6      0.000000      0.000000
 7      0.000000      0.000000

And this is the output for the second transform on b:

Input data :

 0      0.000000     -1.000000
 1     -1.000000      0.000000
 2      0.000000      1.000000
 3      1.000000      0.000000
 4      0.000000     -1.000000
 5     -1.000000      0.000000
 6      0.000000      1.000000
 7      1.000000      0.000000

forward :

Output FFT Coefficients:

 0      0.000000      0.000000
 1      0.000000      0.000000
 2      0.000000      0.000000
 3      0.000000      0.000000
 4      0.000000      0.000000
 5      0.000000      0.000000
 6      0.000000     -8.000000
 7      0.000000      0.000000

They are correct.

Whoops! Not surprisingly, it was a bug in my GPU-output reading code that caused my confusion. Thanks for sanity checking me, mfatica!