3ba388564677495a7d7137e745703448f72449ff
1 /********************* */
4 ** Top contributors (to current version):
5 ** Tim King, Andres Noetzli, Morgan Deters
6 ** This file is part of the CVC4 project.
7 ** Copyright (c) 2009-2019 by the authors listed in the file AUTHORS
8 ** in the top-level source directory) and their institutional affiliations.
9 ** All rights reserved. See the file COPYING in the top-level source
10 ** directory for licensing information.\endverbatim
12 ** \brief [[ Add one-line brief description here ]]
14 ** [[ Add lengthier description here ]]
15 ** \todo document this file
18 #include "cvc4_public.h"
20 #ifndef CVC4__GMP_UTIL_H
21 #define CVC4__GMP_UTIL_H
24 * Older versions of GMP in combination with newer versions of GCC and C++11
25 * cause errors: https://gcc.gnu.org/gcc-4.9/porting_to.html
26 * Including <cstddef> is a workaround for this issue.
34 /** Hashes the gmp integer primitive in a word by word fashion. */
35 inline size_t gmpz_hash(const mpz_t toHash
) {
37 for (int i
= 0, n
= mpz_size(toHash
); i
< n
; ++i
){
38 mp_limb_t limb
= mpz_getlimbn(toHash
, i
);
47 #endif /* CVC4__GMP_UTIL_H */