[Libreoffice-commits] core.git: sc/source

Tor Lillqvist tml at collabora.com
Tue Feb 10 01:11:31 PST 2015


 sc/source/core/opencl/formulagroupcl.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 4032d75eb685ea1a2caebce1a290f613780f504d
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Feb 10 10:49:20 2015 +0200

    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

diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index b1fb0b1..d549451 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)
     {


More information about the Libreoffice-commits mailing list