summaryrefslogtreecommitdiffstats
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-03 15:36:00 +0100
commit27f27e107730cc2242df578fd3e6dbb1a7117066 (patch)
treecf66618df9e757100d504cfd4c6ffc3caa54bbfd
parentadd ^ (=power) and - (=unary minus) to OpenCLSubsetOpCodes (diff)
downloadcore-27f27e107730cc2242df578fd3e6dbb1a7117066.tar.gz
core-27f27e107730cc2242df578fd3e6dbb1a7117066.zip
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>
-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 2501dd8d3916..247422e1b80a 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -967,6 +967,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();
@@ -1108,6 +1119,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;