Otterz

Best way to select only devices with double precision support

Discussion created by Otterz on Feb 28, 2011
Latest reply on Mar 1, 2011 by Otterz

Hi,

Is there a way to request a context with only devices that support double precision? I have been looking at cl_context_properties, but I don't get it.

The way I am currently doing it, is to request a GPU context, then iterating through all devices and doing a string comparison on the tokens from

getInfo<CL_DEVICE_EXTENSIONS>()

And I compare against( cl_khr_fp64 or cl_amd_fp64) to retain the device (otherwise I pop it off).

It seems like there should be an easier way to do this.

 

Thanks !

Outcomes