cvc4-1.4
gmp_util.h
Go to the documentation of this file.
1
/********************* */
18
#include "
cvc4_public.h
"
19
20
#ifndef __CVC4__GMP_UTIL_H
21
#define __CVC4__GMP_UTIL_H
22
23
#include <gmpxx.h>
24
25
namespace
CVC4
{
26
28
inline
size_t
gmpz_hash
(
const
mpz_t toHash) {
29
size_t
hash = 0;
30
for
(
int
i = 0, n = mpz_size(toHash); i < n; ++i){
31
mp_limb_t limb = mpz_getlimbn(toHash, i);
32
hash = hash * 2;
33
hash = hash xor limb;
34
}
35
return
hash;
36
}
/* gmpz_hash() */
37
38
}
/* CVC4 namespace */
39
40
#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
src
util
gmp_util.h
Generated by
1.11.0