adakkak

Determine whether ATI/NVIDIA are used for compilation

Discussion created by adakkak on Jun 5, 2010
Latest reply on Jun 6, 2010 by nou

Is there a way inside a .cl file to know whether the compiler is provided by NVIDIA or ATI? via a define. Also, is there a way to query which extensions are available from within a .cl file?

I am thinking something like

#ifdef USING_NVIDIA_COMPILER
#if HAS_DOUBLE_PRECISION_SUPPORT
#define Real_t double
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#else
#define Real_t float
#endif
#else
#i HAS_DOUBLE_PRECISION_SUPPORT
#define Real_t double
#pragma OPENCL EXTENSION cl_amd_fp64 : enable
#else
#define Real_t float
#endif

Thank you

Outcomes