[mathicgb] 84/393: Fixed bug in hash table hit-verification code.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Fri Apr 3 15:58:36 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 928528a3f0aa49b90ce821e855d0f27a3c73d6ae
Author: Bjarke Hammersholt Roune <bjarkehr.code at gmail.com>
Date: Fri Oct 26 18:41:18 2012 +0200
Fixed bug in hash table hit-verification code.
---
src/mathicgb/PolyRing.hpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mathicgb/PolyRing.hpp b/src/mathicgb/PolyRing.hpp
index 9756f39..71668e7 100755
--- a/src/mathicgb/PolyRing.hpp
+++ b/src/mathicgb/PolyRing.hpp
@@ -660,11 +660,11 @@ inline bool PolyRing::monomialIsProductOfHintTrue(
uint64 A, B, AB;
// We have to use std::memcpy here because just casting to a int64 breaks
// the strict aliasing rule which implies undefined behavior. Both MSVC and
- // gcc don't actually call memcpy here. MSVC is a tiny big slower for this
+ // gcc don't actually call memcpy here. MSVC is a tiny bit slower for this
// code than for casting while GCC seems to be exactly the same speed.
- std::memcpy(&A, &a[i], 8);
- std::memcpy(&B, &b[i], 8);
- std::memcpy(&AB, &ab[i], 8);
+ std::memcpy(&A, &a[i*2], 8);
+ std::memcpy(&B, &b[i*2], 8);
+ std::memcpy(&AB, &ab[i*2], 8);
orOfXor |= AB ^ (A + B);
}
MATHICGB_ASSERT((orOfXor == 0) == monomialIsProductOf(a, b, ab));
--
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