officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 2 - sc/inc/formulacell.hxx | 4 -- sc/inc/tokenarray.hxx | 3 - sc/source/core/data/formulacell.cxx | 9 ----- sc/source/core/tool/calcconfig.cxx | 2 - sc/source/core/tool/token.cxx | 27 --------------- 6 files changed, 3 insertions(+), 44 deletions(-)
New commits: commit 2021275f8fc33d9917d5fef58959a95da1dc7e6f Author: Tor Lillqvist <[email protected]> Date: Wed Jan 7 15:09:48 2015 +0200 Revert "Check number of cells referenced by group instead of group size" This reverts commit cc4dbc0c4613b169045341d1f02bc4c47a407fa0. diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index 899d3b7..0ed021f 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -410,10 +410,6 @@ public: bool IsSharedTop() const; SCROW GetSharedTopRow() const; SCROW GetSharedLength() const; - - // An estimate of the number of cells referenced by the formula - sal_Int32 GetWeight() const; - ScTokenArray* GetSharedCode(); const ScTokenArray* GetSharedCode() const; diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index ab1e941..5d6593d 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -60,9 +60,6 @@ public: virtual ~ScTokenArray(); ScTokenArray* Clone() const; /// True copy! - // An estimate of the number of cells referenced by the token array - sal_Int32 GetWeight() const; - void GenHash(); size_t GetHash() const { return mnHashValue;} diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 5c6511f..a7f4813 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -3752,7 +3752,7 @@ bool ScFormulaCell::InterpretFormulaGroup() if (mxGroup->meCalcState == sc::GroupCalcDisabled) return false; - if (GetWeight() < ScInterpreter::GetGlobalConfig().mnOpenCLMinimumFormulaGroupSize) + if (GetSharedLength() < ScInterpreter::GetGlobalConfig().mnOpenCLMinimumFormulaGroupSize) { mxGroup->meCalcState = sc::GroupCalcDisabled; return false; @@ -4130,13 +4130,6 @@ SCROW ScFormulaCell::GetSharedLength() const return mxGroup ? mxGroup->mnLength : 0; } -sal_Int32 ScFormulaCell::GetWeight() const -{ - if (!mxGroup) - return pCode->GetWeight(); - return GetSharedLength() * GetSharedCode()->GetWeight(); -} - ScTokenArray* ScFormulaCell::GetSharedCode() { return mxGroup ? mxGroup->mpCode : NULL; diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index cff4913..eba1d29 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1417,33 +1417,6 @@ bool ScTokenArray::ImplGetReference( ScRange& rRange, const ScAddress& rPos, boo return bIs; } -sal_Int32 ScTokenArray::GetWeight() const -{ - sal_Int32 result(0); - - FormulaToken** p = pCode; - FormulaToken** pEnd = p + static_cast<size_t>(nLen); - for (; p != pEnd; ++p) - { - switch ((*p)->GetType()) - { - case svDoubleRef : - case svExternalDoubleRef: - { - const ScComplexRefData& rRef = *(*p)->GetDoubleRef(); - result += ( (rRef.Ref2.Row() - rRef.Ref1.Row() + 1) * (rRef.Ref2.Col() - rRef.Ref1.Col() + 1) ); - } - break; - default: - break; - } - } - // Just print out the this pointer. It turns out to be quite complicated to get - // a symbolic printout of the ScTokenArray here. - SAL_INFO("sc.token", "GetWeight(" << this << "): " << result); - return result; -} - namespace { // we want to compare for similar not identical formulae commit 9a531861ac586a49f0493d70e12015d6bb5d6aa6 Author: Tor Lillqvist <[email protected]> Date: Wed Jan 7 15:09:33 2015 +0200 Revert "Let's try a higher limit" This reverts commit 13fca3c98df4722031902da3d443962bb9453542. diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index ecab65a..832c795 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1363,7 +1363,7 @@ <info> <desc>An approximate lower limit on the number of data cells a spreadsheet formula should use for OpenCL to be considered.</desc> </info> - <value>1000</value> + <value>100</value> </prop> <prop oor:name="OpenCLSubsetOpCodes" oor:type="xs:string" oor:nillable="false"> <!-- UIHints: Tools - Options Spreadsheet Formula --> diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index c158821..3e00b05 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -37,7 +37,7 @@ void ScCalcConfig::setOpenCLConfigToDefault() // Crazy. mbOpenCLSubsetOnly = true; mbOpenCLAutoSelect = true; - mnOpenCLMinimumFormulaGroupSize = 1000; + mnOpenCLMinimumFormulaGroupSize = 100; // Keep in order of opcode value, is that clearest? (Random order, // at least, would make no sense at all.) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
