summaryrefslogtreecommitdiff
path: root/src/util/gmp_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/gmp_util.h')
-rw-r--r--src/util/gmp_util.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/util/gmp_util.h b/src/util/gmp_util.h
index a425690a5..87102e644 100644
--- a/src/util/gmp_util.h
+++ b/src/util/gmp_util.h
@@ -17,24 +17,24 @@
** \todo document this file
**/
-#ifndef __CVC4__GMP_H_
-#define __CVC4__GMP_H_
+#ifndef __CVC4__GMP_UTIL_H
+#define __CVC4__GMP_UTIL_H
#include <gmpxx.h>
namespace CVC4 {
- /** Hashes the gmp integer primitive in a word by word fashion. */
- inline size_t gmpz_hash(const mpz_t toHash) {
- size_t hash = 0;
- for (int i=0, n=mpz_size(toHash); i<n; ++i){
- mp_limb_t limb = mpz_getlimbn(toHash, i);
- hash = hash * 2;
- hash = hash xor limb;
- }
- return hash;
+/** Hashes the gmp integer primitive in a word by word fashion. */
+inline size_t gmpz_hash(const mpz_t toHash) {
+ size_t hash = 0;
+ for (int i = 0, n = mpz_size(toHash); i < n; ++i){
+ mp_limb_t limb = mpz_getlimbn(toHash, i);
+ hash = hash * 2;
+ hash = hash xor limb;
}
+ return hash;
+}/* gmpz_hash() */
-}
+}/* CVC4 namespace */
-#endif /* __CVC4__GMP_H_ */
+#endif /* __CVC4__GMP_UTIL_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback