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

Kohei Yoshida kohei.yoshida at collabora.com
Fri Mar 7 06:29:30 PST 2014


 sc/source/core/data/formulacell.cxx      |    4 +---
 sc/source/core/opencl/formulagroupcl.cxx |    4 ++++
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 7a0ed3a406bd14bb2b52c383282daf4777ba76e0
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Mar 7 09:27:05 2014 -0500

    Disable pre-compilation of OpenCL kernels for now.
    
    Change-Id: I1e61fab8ae26c11af05084db1a5542c066f69852

diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 821bc67..a977ef7 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -54,7 +54,7 @@
 
 #include <boost/scoped_ptr.hpp>
 
-#define ENABLE_THREADED_OPENCL_KERNEL_COMPILATION 1
+#define ENABLE_THREADED_OPENCL_KERNEL_COMPILATION 0
 
 using namespace formula;
 
@@ -3506,8 +3506,6 @@ ScFormulaCellGroupRef ScFormulaCell::CreateCellGroup( SCROW nLen, bool bInvarian
 #if ENABLE_THREADED_OPENCL_KERNEL_COMPILATION
     if (mxGroup->sxCompilationThread.is())
         mxGroup->scheduleCompilation();
-#else
-    mxGroup->compileOpenCLKernel();
 #endif
     return mxGroup;
 }
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 3cf52f5..dab6110 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -3208,6 +3208,10 @@ DynamicKernel::~DynamicKernel()
 /// Build code
 void DynamicKernel::CreateKernel(void)
 {
+    if (mpKernel)
+        // already created.
+        return;
+
     cl_int err;
     std::string kname = "DynamicKernel"+mKernelSignature;
     // Compile kernel here!!!


More information about the Libreoffice-commits mailing list