summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-03 11:00:01 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-06 11:49:24 +0200
commit66d1d902ac63e00347f365af5a79bbee02fc832b (patch)
tree0ded868b345c82b522ca4d6b5ba88004d112c33f
parentccf58b0ebb78e1d8884690cfce80ef2f2349c420 (diff)
Don't use OpenCL unless the function is in the subset we support
Change-Id: I6c6fcc492f338cd8994bbc781bbf71abb6bf5057
-rw-r--r--sc/source/core/tool/token.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 717e62b2d682..46fd5a4e8331 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -30,6 +30,7 @@
#include "reftokenhelper.hxx"
#include "clipparam.hxx"
#include "compiler.hxx"
+#include "interpre.hxx"
#include <formula/compiler.hrc>
#include "rechead.hxx"
#include "parclass.hxx"
@@ -1218,6 +1219,12 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
if (SC_OPCODE_START_FUNCTION <= eOp && eOp < SC_OPCODE_STOP_FUNCTION)
{
+ if (ScInterpreter::GetGlobalConfig().mbOpenCLSubsetOnly && ScInterpreter::GetGlobalConfig().maOpenCLSubsetFunctions.find(eOp) == ScInterpreter::GetGlobalConfig().maOpenCLSubsetFunctions.end())
+ {
+ meVectorState = FormulaVectorDisabled;
+ return;
+ }
+
// We support vectorization for the following opcodes.
switch (eOp)
{