summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-11-29 13:19:36 +0100
committerLuboš Luňák <l.lunak@collabora.com>2018-12-04 17:46:27 +0100
commitb8be6d4432fb2e8b382a075d3ae1f31fca9c236b (patch)
tree69fbffaf615698c2e20fba79aaf5b2f4f52b5071 /sc
parent26f20fc63168ade7cebc6e1f198972256ac19350 (diff)
restore incorrectly removed code
149a4d7566 removed NeedParallelReduction() even though the code should be there. I'm not sure about GenSlidingWindowFunction(), since the base class is a template, but better revert that one too. Also revert that part of 73e6a7975b that removed the subsequently no longer used functions. Change-Id: I932ffd58f9528ec840c4575078f8356640eb5420 Reviewed-on: https://gerrit.libreoffice.org/64249 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 27f27e107730cc2242df578fd3e6dbb1a7117066) Reviewed-on: https://gerrit.libreoffice.org/64468
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 4449b0f1e0e1..04c95a8de21f 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -971,6 +971,17 @@ public:
bIsEndFixed = mpDVR->IsEndFixed();
}
+ // Should only be called by SumIfs. Yikes!
+ virtual bool NeedParallelReduction() const
+ {
+ assert(dynamic_cast<OpSumIfs*>(mpCodeGen.get()));
+ return GetWindowSize() > 100 &&
+ ((GetStartFixed() && GetEndFixed()) ||
+ (!GetStartFixed() && !GetEndFixed()));
+ }
+
+ virtual void GenSlidingWindowFunction( std::stringstream& ) { }
+
std::string GenSlidingWindowDeclRef( bool nested = false ) const
{
size_t nArrayLength = mpDVR->GetArrayLength();
@@ -1112,6 +1123,12 @@ public:
size_t GetArrayLength() const { return mpDVR->GetArrayLength(); }
+ size_t GetWindowSize() const { return mpDVR->GetRefRowSize(); }
+
+ size_t GetStartFixed() const { return bIsStartFixed; }
+
+ size_t GetEndFixed() const { return bIsEndFixed; }
+
protected:
bool bIsStartFixed, bIsEndFixed;
const formula::DoubleVectorRefToken* mpDVR;