[mathicgb] 244/393: Added in logging functions for incremental viewing: F4Incremental alias, and F4MatrixSizes, F4SPairDegree, F4MatReduceTop, F4RedBottomRight

Doug Torrance dtorrance-guest at moszumanska.debian.org
Fri Apr 3 15:59:11 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 6a751991cc37c536a69371f585a84f6bc88857d8
Author: Mike Stillman <mikestillman1 at gmail.com>
Date:   Sun Apr 14 10:25:01 2013 -0400

    Added in logging functions for incremental viewing: F4Incremental alias, and F4MatrixSizes,F4SPairDegree,F4MatReduceTop,F4RedBottomRight
---
 src/mathicgb/BuchbergerAlg.cpp    | 10 ++++++++++
 src/mathicgb/F4MatrixBuilder2.cpp | 13 +++++++++++++
 src/mathicgb/F4MatrixReducer.cpp  | 14 ++++++++++++++
 src/mathicgb/F4Reducer.cpp        |  5 +++++
 4 files changed, 42 insertions(+)

diff --git a/src/mathicgb/BuchbergerAlg.cpp b/src/mathicgb/BuchbergerAlg.cpp
index 0354cad..b436bd7 100755
--- a/src/mathicgb/BuchbergerAlg.cpp
+++ b/src/mathicgb/BuchbergerAlg.cpp
@@ -2,8 +2,14 @@
 #include "BuchbergerAlg.hpp"
 #include "Ideal.hpp"
 
+#include "LogDomain.hpp"
 #include <iostream>
 
+MATHICGB_DEFINE_LOG_DOMAIN(
+  F4SPairDegree,
+  "Displays the degree of the S-pairs being considered in F4 Reducers"
+);
+
 BuchbergerAlg::BuchbergerAlg(
   const Ideal& ideal,
   FreeModuleOrderType orderType,
@@ -273,6 +279,10 @@ void BuchbergerAlg::step() {
     if (spairGroup.empty())
       return; // no more s-pairs
     std::vector<std::unique_ptr<Poly> > reduced;
+
+    // w is the negative of the degree of the lcm's of the chosen spairs
+    MATHICGB_LOG(F4SPairDegree) << std::endl << "[degree = " << -w << "]";
+
     mReducer.classicReduceSPolySet(spairGroup, mBasis, reduced);
 
     // sort the elements to get deterministic behavior. The order will change
diff --git a/src/mathicgb/F4MatrixBuilder2.cpp b/src/mathicgb/F4MatrixBuilder2.cpp
index 16dcaa4..fe16282 100755
--- a/src/mathicgb/F4MatrixBuilder2.cpp
+++ b/src/mathicgb/F4MatrixBuilder2.cpp
@@ -9,6 +9,11 @@ MATHICGB_DEFINE_LOG_DOMAIN(
   "Displays statistics about F4 matrix construction."
 );
 
+MATHICGB_DEFINE_LOG_DOMAIN(
+  F4MatrixSizes,
+  "Displays row and column count for each F4 matrix construction."
+);
+
 MATHICGB_NO_INLINE
 std::pair<F4MatrixBuilder2::ColIndex, ConstMonomial>
 F4MatrixBuilder2::findOrCreateColumn(
@@ -277,6 +282,14 @@ void F4MatrixBuilder2::buildMatrixAndClear(QuadMatrix& quadMatrix) {
   quadMatrix = projection.makeAndClear(mMemoryQuantum);
   threadData.clear();
 
+  MATHICGB_LOG(F4MatrixSizes) 
+    << "F4[" 
+    << mathic::ColumnPrinter::commafy(quadMatrix.rowCount())
+    << " by "
+    << mathic::ColumnPrinter::commafy(
+         quadMatrix.computeLeftColCount() + quadMatrix.computeRightColCount())
+    << "]" << std::endl;
+
 #ifdef MATHICGB_DEBUG
   for (size_t side = 0; side < 2; ++side) {
     auto& monos = side == 0 ?
diff --git a/src/mathicgb/F4MatrixReducer.cpp b/src/mathicgb/F4MatrixReducer.cpp
index c6e63d5..7bb3740 100755
--- a/src/mathicgb/F4MatrixReducer.cpp
+++ b/src/mathicgb/F4MatrixReducer.cpp
@@ -20,6 +20,16 @@ MATHICGB_DEFINE_LOG_DOMAIN(
   "Displays statistics about matrices that are row reduced."
 );
 
+MATHICGB_DEFINE_LOG_DOMAIN(
+  F4MatReduceTop,
+  "Displays time to reduce each F4 matrix to the bottom left matrix."
+);
+
+MATHICGB_DEFINE_LOG_DOMAIN(
+  F4RedBottomRight,
+  "Displays time to reduce the bottom left of each F4 matrix."
+);
+
 namespace {
   class DenseRow {
   public:
@@ -758,6 +768,8 @@ SparseMatrix F4MatrixReducer::reduceToBottomRight(const QuadMatrix& matrix) {
     "\n***** Reducing QuadMatrix to bottom right matrix *****\n";
   MATHICGB_IF_STREAM_LOG(F4MatrixReduce)
     {matrix.printStatistics(log.stream());};
+
+  MATHICGB_LOG_TIME(F4MatReduceTop);
   return reduce(matrix, mModulus);
 }
 
@@ -769,6 +781,8 @@ SparseMatrix F4MatrixReducer::reducedRowEchelonForm(
   MATHICGB_IF_STREAM_LOG(F4MatrixReduce)
     {matrix.printStatistics(log.stream());};
 
+  MATHICGB_LOG_TIME(F4RedBottomRight);
+
   const bool useShrawan = false;
   const bool useDelayedModulus = false;
   if (useShrawan) {
diff --git a/src/mathicgb/F4Reducer.cpp b/src/mathicgb/F4Reducer.cpp
index 16e9e19..cb5e359 100755
--- a/src/mathicgb/F4Reducer.cpp
+++ b/src/mathicgb/F4Reducer.cpp
@@ -35,6 +35,11 @@ MATHICGB_DEFINE_LOG_ALIAS(
   "F4MatrixBuild,F4MatrixBuild2,F4MatrixReduce"
 );
 
+MATHICGB_DEFINE_LOG_ALIAS(
+  "F4Incremental",
+  "F4MatrixSizes,F4MatrixBuild2,F4SPairDegree,F4MatReduceTop,F4RedBottomRight"
+);
+
 F4Reducer::F4Reducer(const PolyRing& ring, Type type):
   mType(type),
   mFallback(Reducer::makeReducer(Reducer::Reducer_BjarkeGeo, ring)),

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