I found CUDA indeed very powerful to perform FFT and I have modified the simpleCUFFT example to make it running with double precision data type.
I observe that the h_convolved_signal and h_convolved_signal_ref both become double2* and their x are 2.2121987206156351 and 2.2121986217226501 which are in good agreement up to 1e-7! But the cutComparel2fe() still prompts error:
“ERROR, l2-norm error -1.#IND is greater than epsilon 1e-005”
Does it means cutComparel2fe() cannot works with double data type?
Assuming that h_convolved_signal is a double array, these casts are the problem. You can’t just cast a double pointer to a float pointer and expect the compiler to transparently change the data types. The memory layout for float and double are different. Casting a double to a float by value does what you expect in C, but pointers do not. You’ll have to rewrite cutCompareL2fe to work with double arrays.
Along with all functions beginning with ‘cut’ it is part of the utilities directory of the SDK. As such, it’s not supported by NVIDIA - those routines are simply there to make writing the SDK examples easier. tmurray will be along with the baseball bat shortly…