mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
parent
7a946fd9d0
commit
32968fa41c
4 changed files with 28 additions and 15 deletions
|
@ -75,13 +75,14 @@ inline unsigned unsigned_ptr_hash(unsigned const* vec, unsigned len, unsigned in
|
|||
template<typename Composite, typename GetKindHashProc, typename GetChildHashProc>
|
||||
unsigned get_composite_hash(Composite app, unsigned n, GetKindHashProc const & khasher = GetKindHashProc(), GetChildHashProc const & chasher = GetChildHashProc()) {
|
||||
unsigned a, b, c;
|
||||
SASSERT(n > 0);
|
||||
unsigned kind_hash = khasher(app);
|
||||
|
||||
a = b = 0x9e3779b9;
|
||||
c = 11;
|
||||
|
||||
switch (n) {
|
||||
case 0:
|
||||
return c;
|
||||
case 1:
|
||||
a += kind_hash;
|
||||
b = chasher(app, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue