[SCM] polybori: Polynomials over Boolean Rings branch, upstream-hg, updated. b4a5cffaa908c53e1d958a42110f8c4dad853aa3

Alexander Dreyer adreyer at gmx.de
Fri Mar 23 08:01:14 UTC 2012


The following commit has been merged in the upstream-hg branch:
commit 3fd5998521aad5eb90a81ec6b005131c4ed0af31
Author: Alexander Dreyer <adreyer at gmx.de>
Date:   Tue Feb 21 16:55:55 2012 +0100

    FIX skipping C++-incompatible code from M4RI's headers (C++98 vs. C99)

diff --git a/M4RI/m4ri/debug_dump.h b/M4RI/m4ri/debug_dump.h
index af4253b..5026413 100644
--- a/M4RI/m4ri/debug_dump.h
+++ b/M4RI/m4ri/debug_dump.h
@@ -28,13 +28,14 @@
 
 #ifndef M4RI_DOXYGEN
 
+#ifndef __cplusplus
 static inline word calculate_hash(word const* rowptr, wi_t wide) {
   unsigned long long hash = 0;
   for (word const* ptr = rowptr; ptr < rowptr + wide; ++ptr)
     hash ^= *ptr;
   return hash;
 }
-
+#endif 
 static inline word rotate_word(word w, int shift) {
   return (w << shift) | (w >> (m4ri_radix - w));
 }
diff --git a/M4RI/m4ri/misc.h b/M4RI/m4ri/misc.h
index 17823dc..a185973 100644
--- a/M4RI/m4ri/misc.h
+++ b/M4RI/m4ri/misc.h
@@ -311,6 +311,7 @@ static word const m4ri_ffff = __M4RI_CONVERT_TO_WORD(-1);
 
 #define __M4RI_MIDDLE_BITMASK(n, offset) (__M4RI_LEFT_BITMASK(n) << (offset))
 
+#ifndef __cplusplus
 /**
  * \brief swap bits in the word v
  *
@@ -326,6 +327,7 @@ static inline word m4ri_swap_bits(word v) {
   v =  (v >> 32)                          |  (v                          << 32);
   return v;
 }
+#endif
 
 /**
  * \brief pack bits (inverse of m4ri_spread_bits)
diff --git a/M4RI/m4ri/packedmatrix.h b/M4RI/m4ri/packedmatrix.h
index c0c8171..9785cfb 100644
--- a/M4RI/m4ri/packedmatrix.h
+++ b/M4RI/m4ri/packedmatrix.h
@@ -1385,6 +1385,7 @@ double _mzd_density(mzd_t const *A, wi_t res, rci_t r, rci_t c);
 
 rci_t mzd_first_zero_row(mzd_t const *A);
 
+#ifndef __cplusplus
 /**
  * \brief Return hash value for matrix.
  *
@@ -1397,6 +1398,6 @@ static inline unsigned long long mzd_hash(mzd_t const *A) {
     hash ^= rotate_word(calculate_hash(A->rows[r], A->width), r % m4ri_radix);
   return hash;
 }
-
+#endif 
 
 #endif // M4RI_PACKEDMATRIX_H
diff --git a/M4RI/m4ri/parity.h b/M4RI/m4ri/parity.h
index 072c300..e5a4cda 100644
--- a/M4RI/m4ri/parity.h
+++ b/M4RI/m4ri/parity.h
@@ -38,6 +38,7 @@
 #define __M4RI_MIX32(a, b) (((((a) >> 32) ^ (a)) << 32) | \
                             ((((b) << 32) ^ (b)) >> 32))
 
+#ifndef __cplusplus
 /**
  * \brief Step for mixing two 64-bit words to compute their parity.
  */
@@ -124,4 +125,6 @@ static inline word m4ri_parity64(word *buf)
    return __M4RI_MIX1(e1, e0);
 }
 
+#endif /* __cplusplus */
+
 #endif // M4RI_PARITY_H

-- 
polybori: Polynomials over Boolean Rings



More information about the debian-science-commits mailing list