[mathicgb] 131/393: Timed logging now actually works.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Fri Apr 3 15:58:47 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 87af1a7c3565829cb8d5cd39fd95667a1c6b24ed
Author: Bjarke Hammersholt Roune <bjarkehr.code at gmail.com>
Date:   Thu Dec 13 20:31:27 2012 +0100

    Timed logging now actually works.
---
 src/mathicgb/F4MatrixReducer.cpp | 10 +++++-----
 src/mathicgb/LogDomain.hpp       |  9 +++++++--
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/mathicgb/F4MatrixReducer.cpp b/src/mathicgb/F4MatrixReducer.cpp
index 930bd54..739cbdb 100644
--- a/src/mathicgb/F4MatrixReducer.cpp
+++ b/src/mathicgb/F4MatrixReducer.cpp
@@ -590,19 +590,19 @@ SparseMatrix reduceToEchelonFormShrawanDelayedModulus(
   return std::move(reduced);
 }
 
+#define STR2(X) #X
+#define STR(X) STR2(X)
 SparseMatrix F4MatrixReducer::reduceToBottomRight(const QuadMatrix& matrix) {
+  std::cout << STR(MATHICGB_LOG_TIME(F4MatrixReduce)) << std::endl;
   MATHICGB_ASSERT(matrix.debugAssertValid());
-  //const char* p = STR(MATHICGB_IF_LOG(F4MatrixReduce));
-  /*MATHICGB_IF_LOG(F4MatrixReduce) {
-    matrix.printSizes(log.stream();
-  };*/
+  MATHICGB_IF_LOG(F4MatrixReduce) {matrix.printSizes(log.stream());};
   return reduce(matrix, mModulus);
 }
 
 SparseMatrix F4MatrixReducer::reducedRowEchelonForm(
   const SparseMatrix& matrix
 ) {
-  const bool useShrawan = true;
+  const bool useShrawan = false;
   const bool useDelayedModulus = false;
   if (useShrawan) {
     if (useDelayedModulus)
diff --git a/src/mathicgb/LogDomain.hpp b/src/mathicgb/LogDomain.hpp
index 9f59155..cbe0ea0 100755
--- a/src/mathicgb/LogDomain.hpp
+++ b/src/mathicgb/LogDomain.hpp
@@ -147,7 +147,10 @@ namespace LogDomainInternal {
   template<class L>
   struct LambdaRunner {L& log;};
   template<class L>
-  LambdaRunner<L> lambdaRunner(L& log) {return LambdaRunner<L>{log};}
+  LambdaRunner<L> lambdaRunner(L& l) {
+    LambdaRunner<L> r = {l};
+    return r;
+  }
   template<class L, class T>
   void operator+(LambdaRunner<L> runner, T& lambda) {lambda(runner.log);}
 }
@@ -228,7 +231,9 @@ namespace LogDomainInternal {
 /// Example:
 ///   MATHICGB_LOG_SCOPE_TIME(MyDomain) << "Starting timed task";
 #define MATHICGB_LOG_TIME(DOMAIN) \
-  auto MATHICGB_timer##DOMAIN##_##__LINE__(MATHICGB_LOGGER(DOMAIN).timer()); \
+  auto MATHICGB_CONCATENATE_AFTER_EXPANSION( \
+    DOMAIN, MATHICGB_CONCATENATE_AFTER_EXPANSION(_timer_, __LINE__)) \
+  (MATHICGB_LOGGER(DOMAIN).timer()); \
   MATHICGB_LOG(DOMAIN)
 
 #endif

-- 
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