How does CUDA 2.3 compare floats?
I have a program written in CUDA-C that compiles without warnings with NVCC 2.2. I recently upgraded to NVCC 2.3 and now (after fixing some other things) get “warning : Double is not supported. Demoting to float” when I compile. I have narrowed down the source of the warning to two sections:
float a = ...;// Some function that returns a float
if (a <= 0.0f) { // Commenting out this line moves the warning to a different line
float * u = ...;// Some function that returns a pointer to float
if (*u < a) { // Also commenting out this line gets rid of the warning
Is NVCC 2.3 promoting the two floats to doubles to do the comparison? I am wanting to stick to using floats throughout my program so how to I get rid of the warnings?