double precision support

Hi All,
Is the a way in cuda to check for double precision supported GPU ? I know all GPUs with compute compatibility above 1.3 supports double precision. So is it sufficient to check compute compatibility to verify double precision.

regards

Yes… just check the device caps for 1.3 or later.

This code returns device capablity if You have 1 device:

[codebox]cudaDeviceProp devProp;

cudaGetDeviceProperties(&devProp, 0);

printf(“Compute capability: %d.%d”, devProp.major, devProp.minor);

[/codebox]

// Check for double precision support

if(devProp.major*100 + devProp.minor > 102)

{

printf("Double precision supported");

}

else

{

printf(“Double precision not supported”);

}

Is this a safe way to verify double precision supported GPU ?