How to force double precision ?

Hello everyone!

Does anybody know how to force double precision computation in CUDA programs. Command line contains information about GPU compatibility:

"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\bin\nvcc.exe" -gencode=arch=compute_13,code=\"sm_13,compute_13\" --use-local-env --cl-version 2008 -ccbin "g:\DevTools\Microsoft Visual Studio 9.0\VC\bin\x86_amd64" -I"C:\Program Files\NVIDIA GPU

 Computing Toolkit\CUDA\v4.0\lib\x64" -I"../../common/lib" -I"C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\common\inc\dynlink" -I"C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v3.2\include"

 -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\include"  -G0  --keep-dir "x64\Debug\" -maxrregcount=32  --machine 64 --compile  -D_NEXUS_DEBUG -g    -Xcompiler "/EHsc /nologo /Od /Zi  /MDd " -o "x64\Debug\MatMul.obj"

 "C:\Users\insomnia\Documents\Visual Studio 2010\Projects\CUDATest\CUDATest\MatMul.cu"

But execution performance does not differ in case of using single and double precision variables in code. Does anyone know how to force DP ?

You can’t automagically make single precision code run in double precision.

As I understand I have to convert to some special DP type like double1 or smth else ?

CUDA is effectively standard C. float is the single precision floating point type, double is the double precision type. Depending on which type of hardware you use, a limited subset or almost all the IEEE754-2008 standard is implemented for both precisions (in hardware that has double precision support). The programming guide lists all the standard library functions which are supported in each precision, including expected accuracy of each function.

Documentation of all of this is abundant. If you have the CUDA toolkit, you have all of it in PDF form at your disposal.