[Libreoffice-commits] core.git: sc/source

Tor Lillqvist tml at collabora.com
Mon Jun 27 17:18:53 UTC 2016


 sc/source/core/tool/token.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 0c80b4dfd27109def7a5bdc34c3fcc5499db6c0d
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Jun 27 19:53:45 2016 +0300

    Add SAL_INFOs describing why vectorisation is disabled for a formula group
    
    Change-Id: I592be80307ee8fe91cc52f19c46895699460a7cc

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 50c6591..1f72090 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -31,7 +31,10 @@
 #include "clipparam.hxx"
 #include "compiler.hxx"
 #include "interpre.hxx"
+#include <formula/FormulaCompiler.hxx>
 #include <formula/compiler.hrc>
+#include <formula/grammar.hxx>
+#include <formula/opcode.hxx>
 #include <formulagroup.hxx>
 #include "rechead.hxx"
 #include "parclass.hxx"
@@ -1330,6 +1333,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
     {
         if (ScInterpreter::GetGlobalConfig().mbOpenCLSubsetOnly && ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->find(eOp) == ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->end())
         {
+            SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables vectorisation for formula group");
             meVectorState = FormulaVectorDisabled;
             return;
         }
@@ -1338,6 +1342,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
         // 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) << " disables S/W interpreter for formula group");
             meVectorState = FormulaVectorDisabled;
             return;
         }
@@ -1526,6 +1531,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
             // Don't change the state.
             break;
             default:
+                SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables vectorisation for formula group");
                 meVectorState = FormulaVectorDisabled;
         }
     }
@@ -1565,6 +1571,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
             case svSubroutine:
             case svUnknown:
                 // We don't support vectorization on these.
+                SAL_INFO("sc.opencl", "opcode ocPush: variable type disables vectorisation for formula group");
                 meVectorState = FormulaVectorDisabled;
             break;
             default:
@@ -1575,6 +1582,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
         ScInterpreter::GetGlobalConfig().mbOpenCLSubsetOnly &&
         ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->find(eOp) == ScInterpreter::GetGlobalConfig().mpOpenCLSubsetOpCodes->end())
     {
+        SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables vectorisation for formula group");
         meVectorState = FormulaVectorDisabled;
     }
     // only when openCL interpreter is not enabled - the assumption is that
@@ -1584,6 +1592,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
         (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) << " disables S/W interpreter for formula group");
         meVectorState = FormulaVectorDisabled;
     }
 }


More information about the Libreoffice-commits mailing list