CUDA fft 2d different results from MATLAB fft on 2d
问题 I have tried to do a simple fft and compare the results between MATLAB and CUDA on 2d arrays. MATLAB: array of 9 numbers 1-9 I = [1 2 3 4 5 6 7 8 9]; and use this code: fft(I) gives the results: 12.0000 + 0.0000i 15.0000 + 0.0000i 18.0000 + 0.0000i -4.5000 + 2.5981i -4.5000 + 2.5981i -4.5000 + 2.5981i -4.5000 - 2.5981i -4.5000 - 2.5981i -4.5000 - 2.5981i And CUDA code: int FFT_Test_Function() { int width = 3; int height = 3; int n = width * height; double in[width][height]; Complex out[width]