From ccf58b0ebb78e1d8884690cfce80ef2f2349c420 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 3 Nov 2014 10:59:27 +0200 Subject: Don't use OpenCL unless the group is long enough Change-Id: I37d54e39186fca2653717bb364072a2b283bcfb9 --- sc/source/core/data/formulacell.cxx | 6 ++++++ 1 file changed, 6 insertions(+) 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: -- cgit