[mathicgb] 191/393: MathicGB now compiles and tests pass on Cygwin with GCC without TBB. Still some configure issues.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Fri Apr 3 15:58:58 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 2cc09555646998260100b7c171683dca6da953cf
Author: Bjarke Hammersholt Roune <bjarkehr.code at gmail.com>
Date: Mon Mar 18 17:33:50 2013 +0100
MathicGB now compiles and tests pass on Cygwin with GCC without TBB. Still some configure issues.
---
src/mathicgb.cpp | 2 +-
src/mathicgb.h | 2 ++
src/mathicgb/F4MatrixBuilder2.cpp | 2 +-
src/mathicgb/LogDomainSet.cpp | 8 ++++----
src/mathicgb/PolyRing.cpp | 11 +++++------
5 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/mathicgb.cpp b/src/mathicgb.cpp
index f11fa5b..89f131a 100644
--- a/src/mathicgb.cpp
+++ b/src/mathicgb.cpp
@@ -342,7 +342,7 @@ namespace mgb {
#ifdef MATHICGB_DEBUG
hasBeenDestroyed(false),
checker(conf.modulus(), conf.varCount()),
-#endif MATHICGB_DEBUG
+#endif
// @todo: varCount should not be int. Fix PolyRing constructor,
// then remove this static_cast.
ring(conf.modulus(), static_cast<int>(conf.varCount()), 1),
diff --git a/src/mathicgb.h b/src/mathicgb.h
index 6367be1..4c3973d 100644
--- a/src/mathicgb.h
+++ b/src/mathicgb.h
@@ -132,6 +132,8 @@ namespace mgb { // Part of the public interface of MathicGB
OutputStream& output
);
+ class NullIdealStream;
+
/// Passes on all method calls to an inner ideal stream while printing out
/// what methods get called to an std::ostream.
template<class Stream = NullIdealStream>
diff --git a/src/mathicgb/F4MatrixBuilder2.cpp b/src/mathicgb/F4MatrixBuilder2.cpp
index a222e2a..16dcaa4 100755
--- a/src/mathicgb/F4MatrixBuilder2.cpp
+++ b/src/mathicgb/F4MatrixBuilder2.cpp
@@ -348,7 +348,7 @@ void F4MatrixBuilder2::appendRow(
const auto begin = poly.begin();
const auto end = poly.end();
- const auto count = std::distance(begin, end);
+ const auto count = static_cast<size_t>(std::distance(begin, end));
MATHICGB_ASSERT(count < std::numeric_limits<ColIndex>::max());
auto indices = block.makeRowWithTheseScalars(poly);
diff --git a/src/mathicgb/LogDomainSet.cpp b/src/mathicgb/LogDomainSet.cpp
index 53f2ed2..721f97e 100644
--- a/src/mathicgb/LogDomainSet.cpp
+++ b/src/mathicgb/LogDomainSet.cpp
@@ -68,15 +68,15 @@ void LogDomainSet::performLogCommandInternal(
// This could be more efficient, but this is not supposed to be a
// method that is called very often.
- if (isSign(cmd.front())) {
+ if (isSign(cmd[0])) {
if (prefix == ' ')
- prefix = cmd.front();
+ prefix = cmd[0];
cmd.erase(cmd.begin());
}
- if (!cmd.empty() && isSign(cmd.back())) {
+ if (!cmd.empty() && isSign(*cmd.rbegin())) {
if (suffix == ' ')
- suffix = cmd.back();
+ suffix = *cmd.rbegin();
cmd.erase(cmd.end() - 1);
}
diff --git a/src/mathicgb/PolyRing.cpp b/src/mathicgb/PolyRing.cpp
index 8a38518..7b366f6 100755
--- a/src/mathicgb/PolyRing.cpp
+++ b/src/mathicgb/PolyRing.cpp
@@ -685,12 +685,11 @@ void PolyRing::write(std::ostream &o) const
{
o << mCharac << " " << mNumVars << " " << mNumWeights << std::endl;
auto wts = &mWeights[0];
- for (int i=0; i<mNumWeights; i++)
- {
- for (size_t j=0; j<mNumVars; j++)
- o << " " << - *wts++;
- o << std::endl;
- }
+ for (size_t i = 0; i < mNumWeights; ++i) {
+ for (size_t j = 0; j < mNumVars; ++j)
+ o << " " << - *wts++;
+ o << std::endl;
+ }
}
// Local Variables:
--
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