From b98edda0719e382f38e68ecd76653c5de74aa283 Mon Sep 17 00:00:00 2001 From: "I-Jui (Ray) Sung" Date: Wed, 20 Nov 2013 08:49:27 -0600 Subject: GPU Calc: re-enable parallel SUMIFS Change-Id: I70797f089ead267d223772b73c4d093813716029 --- sc/source/core/opencl/formulagroupcl.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sc') diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 5d14ddddf233..2ddff7582373 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(mpCodeGen.get())); + return GetWindowSize()> 100 && + ( (GetStartFixed() && GetEndFixed()) || + (!GetStartFixed() && !GetEndFixed()) ) ; + } virtual void GenSlidingWindowFunction(std::stringstream &) {} virtual std::string GenSlidingWindowDeclRef(bool=false) const -- cgit v1.2.3