4 Replies Latest reply on Jun 6, 2010 8:27 AM by nou

    Determine whether ATI/NVIDIA are used for compilation

    adakkak

      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