math.h, tgmath.h and cuComplex.h nvcc compiler

Hi all,

I’ve had a problem with my code.
If I change all of my double’s to floats and compile with the intel icc compiler I find that the code takes twice the length of time to run. By compiling with tgmath.h instead of math.h and adding the flag -std=c99 to my compiler arguments I find the problem goes away. I suspect that there is some type casting going on somewhere that I just cant find.

If I try to replace math.h with tgmath.h in the cuda version of my code I get a load of abuse from the compiler saying there are errors in cuComplex.h

Could anyone suggest how I can get around this???

I normally just pass nvcc -O3 to optimise for speed.

Thanks for any help,