[Libreoffice-commits] .: 2 commits - sc/source

David Tardon dtardon at kemper.freedesktop.org
Sat Nov 27 00:23:28 PST 2010


 sc/source/core/tool/interpr5.cxx |   41 ++++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 19 deletions(-)

New commits:
commit 55f6be69e7bb5bab852438f979002d64f7fc6a12
Author: David Tardon <dtardon at redhat.com>
Date:   Sat Nov 27 09:19:00 2010 +0100

    fix debug build with dbglevel=2

diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 01fad46..fe64d84 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -100,6 +100,28 @@ const double fInvEpsilon = 1.0E-7;
         }
     };
 
+namespace
+{
+
+// Multiply n x m Mat A with m x l Mat B to n x l Mat R
+void lcl_MFastMult(ScMatrixRef pA, ScMatrixRef pB, ScMatrixRef pR,
+                   SCSIZE n, SCSIZE m, SCSIZE l)
+{
+    double sum;
+    for (SCSIZE row = 0; row < n; row++)
+    {
+        for (SCSIZE col = 0; col < l; col++)
+        {   // result element(col, row) =sum[ (row of A) * (column of B)]
+            sum = 0.0;
+            for (SCSIZE k = 0; k < m; k++)
+                sum += pA->GetDouble(k,row) * pB->GetDouble(col,k);
+            pR->PutDouble(sum, col, row);
+        }
+    }
+}
+
+}
+
 double ScInterpreter::ScGetGCD(double fx, double fy)
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::div" );
@@ -1852,23 +1874,6 @@ namespace {
 // Remember, ScMatrix matrices are zero based, index access (column,row).
 // -----------------------------------------------------------------------------
 
-// Multiply n x m Mat A with m x l Mat B to n x l Mat R
-void lcl_MFastMult(ScMatrixRef pA, ScMatrixRef pB, ScMatrixRef pR,
-                   SCSIZE n, SCSIZE m, SCSIZE l)
-{
-    double sum;
-    for (SCSIZE row = 0; row < n; row++)
-    {
-        for (SCSIZE col = 0; col < l; col++)
-        {   // result element(col, row) =sum[ (row of A) * (column of B)]
-            sum = 0.0;
-            for (SCSIZE k = 0; k < m; k++)
-                sum += pA->GetDouble(k,row) * pB->GetDouble(col,k);
-            pR->PutDouble(sum, col, row);
-        }
-    }
-}
-
 // <A;B> over all elements; uses the matrices as vectors of length M
 double lcl_GetSumProduct(ScMatrixRef pMatA, ScMatrixRef pMatB, SCSIZE nM)
 {
commit b73ec299c85951ab07dd5780af49860eb045afed
Author: David Tardon <dtardon at redhat.com>
Date:   Sat Nov 27 09:07:47 2010 +0100

    remove unnecessary #if
    
    It's in #if OSL_DEBUG_LEVEL > 1 block already.

diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 6ce149d..01fad46 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -939,9 +939,7 @@ void ScInterpreter::ScMatInv()
                     {
                         ScMatrix* pR = xR;
                         lcl_MFastMult( pMat, pY, pR, nR, nR, nR);
-#if OSL_DEBUG_LEVEL > 1
                         fprintf( stderr, "\n%s\n", "ScMatInv(): mult-identity");
-#endif
                         for (SCSIZE i=0; i < nR; ++i)
                         {
                             for (SCSIZE j=0; j < nR; ++j)


More information about the Libreoffice-commits mailing list