Factor of IFFT

Hello,

I used the following code to run an inverse FFT on a complex float vector:

res = cufftPlanMany(&planRow, 1, 4096,	   //plan, rank, n
	     				NULL, 1, 4096,  	   //inembed, istried, idist  
	     				NULL, 1, 4096,      //oneembed, ostride, odist 
	     				CUFFT_C2C, 512);   //type, batch

res = cufftExecC2C (planRow, pDest, pDest, CUFFT_INVERSE);

I compared the results of the IFFT to Matlab.
with cuFFT each complex sample is 4096 times larger that a Matlab sample.
Can you please explain it ? How can I fix it ?

Thank you,
Zvika

divide each sample by 4096 (i.e. divide by the length of the transform)

This is covered in the CUFFT documentation

https://docs.nvidia.com/cuda/cufft/index.html#cufft-transform-directions

Hi Robert,

Thank you very much.

I think NVIDIA should consider to do the division inside the function, to improve performance.

Best regards,
Zvika