@@ -1,3 +1,9 @@
+2011-01-25 Sebastian Pop <sebastian.pop@amd.com>
+
+ * graphite-opencl.c (opencl_create_function_call): Use cl_khr_fp64
+ pragma extension only when it is defined. Use cl_amd_fp64 when it
+ is defined.
+
2011-01-23 Tobias Grosser <grosser@fim.uni-passau.de>
* doc/install.texi: Replace '/' by an or and give the exact
@@ -1641,8 +1641,13 @@ opencl_create_function_call (edge base)
(main_program_src,
"#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable\n");
/* Required for double type. */
- dyn_string_prepend_cstr
- (main_program_src, "#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n ");
+ dyn_string_prepend_cstr (main_program_src,
+ "#if defined(cl_khr_fp64)\n"
+ "#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n"
+ "#elif defined(cl_amd_fp64)\n"
+ "#pragma OPENCL EXTENSION cl_amd_fp64 : enable\n"
+ "#endif\n");
+
src = dyn_string_buf (main_program_src);
if (dump_file && (dump_flags & TDF_DETAILS))