diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2018-08-06 14:55:04 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-08-09 09:32:34 +0200 |
commit | 089a4f245325a5be5cd5951d85305d791b4d9cb6 (patch) | |
tree | 6a1d6d4ac8f78dd7d13dcea009921698add454a4 /sc/source/core/tool/token.cxx | |
parent | 954f59db6cddc79d1f629fafc53ad20b6c4a14de (diff) |
remove Calc's software interpreter
- it's in practice never used nowadays, group threading has higher
priority in the code and since SwInterpreter's allowed opcodes are
a subset of group threading's, there should be no formula where
control flow gets as far as using SwInterpreter
- the only opcodes SwInterpreter allows are ocAdd, ocSub, ocMul,
ocDiv, ocSum and ocProduct, which is a rather limited set and group
threading should handle all that as well
- if SwInterpreter performs anything better than group threading,
there shouldn't be a problem doing the same for group threading
- it's yet another code path that should be handled, tested, etc.
and the added complexity is not worth it
- it shares some code with OpenCL handling, which is both added
hassle in case OpenCL code needs changes, and it also causes confusion
such as people thinking SwInterpreter has something to do with OpenCL
Change-Id: I99052862b60b6266c70dd436d1d7938177dc6bd9
Reviewed-on: https://gerrit.libreoffice.org/58643
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'sc/source/core/tool/token.cxx')
-rw-r--r-- | sc/source/core/tool/token.cxx | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 857e104f6895..5a8325959693 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1376,19 +1376,6 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) return; } - // test for OpenCL interpreter first - the assumption is that S/W - // interpreter blacklist is more strict than the OpenCL one - if (ScCalcConfig::isSwInterpreterEnabled() && - (dynamic_cast<sc::FormulaGroupInterpreterSoftware*>(sc::FormulaGroupInterpreter::getStatic()) != nullptr) && - ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->find(eOp) == ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->end()) - { - SAL_INFO("sc.core.formulagroup", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) - << "(" << int(eOp) << ") disables S/W interpreter for formula group"); - meVectorState = FormulaVectorDisabledNotInSoftwareSubset; - mbOpenCLEnabled = false; - return; - } - // We support vectorization for the following opcodes. switch (eOp) { @@ -1627,18 +1614,6 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) mbOpenCLEnabled = false; return; } - // only when openCL interpreter is not enabled - the assumption is that - // the S/W interpreter blacklist is more strict - else if (ScCalcConfig::isSwInterpreterEnabled() && - (dynamic_cast<sc::FormulaGroupInterpreterSoftware*>(sc::FormulaGroupInterpreter::getStatic()) != nullptr) && - ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->find(eOp) == ScInterpreter::GetGlobalConfig().mpSwInterpreterSubsetOpCodes->end()) - { - SAL_INFO("sc.core.formulagroup", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) - << "(" << int(eOp) << ") disables S/W interpreter for formula group"); - meVectorState = FormulaVectorDisabledNotInSoftwareSubset; - mbOpenCLEnabled = false; - return; - } } else { @@ -1825,7 +1800,7 @@ void ScTokenArray::GenHash() void ScTokenArray::ResetVectorState() { - mbOpenCLEnabled = ScCalcConfig::isOpenCLEnabled() || ScCalcConfig::isSwInterpreterEnabled(); + mbOpenCLEnabled = ScCalcConfig::isOpenCLEnabled(); meVectorState = mbOpenCLEnabled ? FormulaVectorEnabled : FormulaVectorDisabled; mbThreadingEnabled = ScCalcConfig::isThreadingEnabled(); } |