Using single precision floating-point with FFTW in Visual Studio

1.5k views Asked by At

I am trying to use the FFTW library in a Visual Studio project, and I am having trouble with getting the floating point precision to work. I have created the library files and linked them as in this post and I have only included the libfftw3f-3.lib library as it says in their documentation, and everything else is fine except for the fftw_plan_dft_r2c_2d() function. It will not accept my array of type float* for parameter 3 because it is incompatible with its argument of type double*. I understand it is just precision but, I would prefer to use floating point because fftw does support it, and b/c of the way I am memcpy() 'ing data from a float array. I am just having issues with fftw library using floating point. I havent seen anything specific on this in their Windows section like in their Unix section besides linking to the libfftw3f-3.lib library. Can anyone give me clues on how to make this happen?

1

There are 1 answers

0
Paul R On BEST ANSWER

For single precision routines in FFTW you need to use routines with an fftwf_ prefix rather than fftw_, so your call to fftw_plan_dft_r2c_2d() should actually be fftwf_plan_dft_r2c_2d().