[Libreoffice-commits] core.git: Branch 'feature/calc-group-interpreter-4' - sc/source

I-Jui Sung (Ray) ray at multicorewareinc.com
Sun Nov 17 21:25:50 PST 2013


 sc/source/core/opencl/formulagroupcl.cxx |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 12026388fab146e3384f1ed00d1d9018795e18b0
Author: I-Jui (Ray) Sung <ray at multicorewareinc.com>
Date:   Sun Nov 17 23:23:42 2013 -0600

    GPU Calc: fix building error on Windows
    
    Change-Id: I4a7e02c24f82222bdf9fc4fb66504ed3b6b09f34

diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index fd4be3f..9a51af6 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -493,7 +493,7 @@ public:
             {
                 // set 100 as a temporary threshold for invoking reduction
                 // kernel in NeedParalleLReduction function
-                if (NeedParallelReduction())
+                if (/*NeedParallelReduction()*/false)
                 {
                     std::string temp = Base::GetName() + "[gid0]";
                     ss << "tmp = ";
@@ -508,7 +508,7 @@ public:
             {
                 // set 100 as a temporary threshold for invoking reduction
                 // kernel in NeedParalleLReduction function
-                if (NeedParallelReduction())
+                if (NeedParallelReduction()&&false)
                 {
                     std::string temp = Base::GetName() + "[0]";
                     ss << "tmp = ";
@@ -550,11 +550,9 @@ public:
         }
         else
         {
-#ifdef  ISNAN
-            ss << "0; i < "<< nCurWindowSize << "; i++){\n\t\t";
-#else
-            ss << "0; i < "<< nCurWindowSize << "; i++)\n\t\t";
-#endif
+            unsigned limit =
+                std::min(mpDVR->GetArrayLength(), nCurWindowSize);
+            ss << "0; i < "<< limit << "; i++){\n\t\t";
         }
 
         return nCurWindowSize;
@@ -1074,8 +1072,8 @@ public:
             KernelEnv kEnv;
             OpenclDevice::setKernelEnv(&kEnv);
             cl_int err;
-            DynamicKernelSlidingArgument<DynamicKernelArgument> *slidingArgPtr =
-                dynamic_cast< DynamicKernelSlidingArgument<DynamicKernelArgument> *>
+            DynamicKernelSlidingArgument<VectorRef> *slidingArgPtr =
+                dynamic_cast< DynamicKernelSlidingArgument<VectorRef> *>
                 (mvSubArguments[0].get());
             cl_mem mpClmem2;
 


More information about the Libreoffice-commits mailing list