scaling factor for CUFFT

I wrote a simple test program, where I was doing Complex to Complex FT's and I just generated some data 1..50 and stuck it in for the real and imaginary part for each index of the array.

When I do an operation like this IFFT(FFT(A)) = A

to test them out, I am getting different results for each library.

FFTW, I have to divide the output by len(A) to get back the original A

However, doing this forward then reverse FFT with CUFFT, it looks like I have to divide by (sqrt(2)*50) to get back to the original data.

Where is this extra square root factor coming from?

according to the CUFFT documentation: CUFFT выполняет ненормализованное БПФ; то есть выполнение форварда БПФ для набора входных данных с последующим обратным БПФ для результирующего set выдает данные, которые равны входу, масштабированному на количество элементы. Масштабирование либо преобразование на величину, обратную размеру data set is left for the user to perform as seen fit.

Thanks in Advance

6
задан Derek 9 March 2011 в 21:56
поделиться