summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-02-10 10:49:20 +0200
committerTor Lillqvist <tml@collabora.com>2015-02-10 11:06:41 +0200
commit4032d75eb685ea1a2caebce1a290f613780f504d (patch)
treec2ce938c6f51800cc8ef68c278e49126a03edbc3 /sc
parentd857871bcbccd0c69645e5e963d106362f40382e (diff)
Avoid OpenCL compiler warning "OpenCL extension is now part of core"
64-bit floating point became an optional part of OpenCL core in 1.2 and is no longer an extension. The pragma is not needed in 1.2 and later. It causes a warning that is indeed harmless, but still clutters the compiler diagnostic output that is displayed when there is some actual error in generated OpenCL code. Change-Id: Id8ea4b39f7e8e788d7683f8b389f53eadc57ea18
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index b1fb0b175d26..d5494516795f 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -3733,7 +3733,9 @@ void DynamicKernel::CodeGen()
std::stringstream decl;
if (::opencl::gpuEnv.mnKhrFp64Flag)
{
+ decl << "#if __OPENCL_VERSION__ < 120\n";
decl << "#pragma OPENCL EXTENSION cl_khr_fp64: enable\n";
+ decl << "#endif\n";
}
else if (::opencl::gpuEnv.mnAmdFp64Flag)
{