summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-03 10:59:27 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-06 11:49:24 +0200
commitccf58b0ebb78e1d8884690cfce80ef2f2349c420 (patch)
treeacd2653c9ec208cbb925b84127c2abcfa387ebd6
parentef1cce467728c1fcfd78871990a8b5af09a0fc85 (diff)
Don't use OpenCL unless the group is long enough
Change-Id: I37d54e39186fca2653717bb364072a2b283bcfb9
-rw-r--r--sc/source/core/data/formulacell.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 96b433932f45..1d9b20fb0d9e 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3653,6 +3653,12 @@ bool ScFormulaCell::InterpretFormulaGroup()
if (mxGroup->meCalcState == sc::GroupCalcDisabled)
return false;
+ if (GetSharedLength() < ScInterpreter::GetGlobalConfig().mnOpenCLMinimumFormulaGroupSize)
+ {
+ mxGroup->meCalcState = sc::GroupCalcDisabled;
+ return false;
+ }
+
switch (pCode->GetVectorState())
{
case FormulaVectorEnabled: