[mathicgb] 180/393: Fix to make non-assert mode compile.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Fri Apr 3 15:58:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository mathicgb.

commit 210c74c07a3bad1ed3eaca22ab299147ed7267c8
Author: Bjarke Hammersholt Roune <bjarkehr.code at gmail.com>
Date:   Wed Mar 6 13:27:31 2013 +0100

    Fix to make non-assert mode compile.
---
 src/mathicgb/F4MatrixProjection.cpp | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/mathicgb/F4MatrixProjection.cpp b/src/mathicgb/F4MatrixProjection.cpp
index efe71c3..f5b45ea 100644
--- a/src/mathicgb/F4MatrixProjection.cpp
+++ b/src/mathicgb/F4MatrixProjection.cpp
@@ -85,17 +85,17 @@ public:
     }
   }
 
-#ifdef MATHICGB_DEBUG
   bool debugAssertValid() {
+#ifdef MATHICGB_DEBUG
     auto check = [](RowMultiple r) {
       MATHICGB_ASSERT(r.first.entryCount > 0);
       MATHICGB_ASSERT(r.second != 0);
     };
     std::for_each(mTopRows.begin(), mTopRows.end(), check);
     std::for_each(mBottomRows.begin(), mBottomRows.end(), check);
+#endif MATHICGB_DEBUG
     return true;
   }
-#endif
 
   Scalar modulus() const {return mModulus;}
   const RowVector& top() const {return mTopRows;}
@@ -255,9 +255,7 @@ QuadMatrix F4MatrixProjection::makeAndClearOneStep(const size_t quantum) {
 done:;
     }
   }
-#ifdef MATHICGB_DEBUG
-  tb.debugAssertValid();
-#endif
+  MATHICGB_ASSERT(tb.debugAssertValid());
 
   // Split left/right and top/bottom simultaneously
   LeftRight top(mColProjectTo, ring(), quantum);
@@ -342,9 +340,7 @@ QuadMatrix F4MatrixProjection::makeAndClearTwoStep(const size_t quantum) {
       tb.addRow(r, entry.index(), entry.scalar());
     }
   }
-#ifdef MATHICGB_DEBUG
-  tb.debugAssertValid();
-#endif
+  MATHICGB_ASSERT(tb.debugAssertValid());
 
   QuadMatrix qm;
   auto left = projectRows(tb, quantum, lr.moveLeft());

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mathicgb.git



More information about the debian-science-commits mailing list