gmp_util.h
Go to the documentation of this file.
/********************* */
#include "cvc4_public.h"
#ifndef __CVC4__GMP_UTIL_H
#define __CVC4__GMP_UTIL_H
#include <gmpxx.h>
namespace CVC4 {
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_UTIL_H */
cvc4_public.h
Macros that should be defined everywhere during the building of the libraries and driver binary,...
CVC4
Definition expr.h:106
CVC4::gmpz_hash
size_t gmpz_hash(const mpz_t toHash)
Hashes the gmp integer primitive in a word by word fashion.
Definition gmp_util.h:28