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

I-Jui Sung (Ray) ray at multicorewareinc.com
Wed Nov 20 13:35:44 PST 2013


 sc/source/core/opencl/formulagroupcl.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 4b4c1660684bb495aa05185a4b9e0c3eb0ea2770
Author: I-Jui (Ray) Sung <ray at multicorewareinc.com>
Date:   Wed Nov 20 08:49:27 2013 -0600

    GPU Calc: re-enable parallel SUMIFS
    
    Change-Id: I70797f089ead267d223772b73c4d093813716029

diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 6e4df20..ad28bd2 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -434,7 +434,14 @@ public:
         bIsStartFixed = mpDVR->IsStartFixed();
         bIsEndFixed = mpDVR->IsEndFixed();
     }
-
+    // Should only be called by SumIfs. Yikes!
+    virtual bool NeedParallelReduction(void) const
+    {
+        assert(dynamic_cast<OpSumIfs*>(mpCodeGen.get()));
+        return GetWindowSize()> 100 &&
+            ( (GetStartFixed() && GetEndFixed()) ||
+              (!GetStartFixed() && !GetEndFixed())  ) ;
+    }
     virtual void GenSlidingWindowFunction(std::stringstream &) {}
 
     virtual std::string GenSlidingWindowDeclRef(bool=false) const


More information about the Libreoffice-commits mailing list