diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-07-02 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-07-02 08:01:00 -0700 |
commit | 303baf27cf34c2a57db97c4c567fd744241fa14b (patch) | |
tree | d6235cca48e7bdfe5884e517058c7791e66bb806 /src/misc/extra/extra.h | |
parent | fa67e3c19e27c011517b91182eb3929412aaf402 (diff) | |
download | abc-303baf27cf34c2a57db97c4c567fd744241fa14b.tar.gz abc-303baf27cf34c2a57db97c4c567fd744241fa14b.tar.bz2 abc-303baf27cf34c2a57db97c4c567fd744241fa14b.zip |
Version abc80702
Diffstat (limited to 'src/misc/extra/extra.h')
-rw-r--r-- | src/misc/extra/extra.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/misc/extra/extra.h b/src/misc/extra/extra.h index 9870c3d0..6b840024 100644 --- a/src/misc/extra/extra.h +++ b/src/misc/extra/extra.h @@ -93,21 +93,21 @@ typedef unsigned long long uint64; // hash key macros #define hashKey1(a,TSIZE) \ -((unsigned)(a) % TSIZE) +((PORT_PTRUINT_T)(a) % TSIZE) #define hashKey2(a,b,TSIZE) \ -(((unsigned)(a) + (unsigned)(b) * DD_P1) % TSIZE) +(((PORT_PTRUINT_T)(a) + (PORT_PTRUINT_T)(b) * DD_P1) % TSIZE) #define hashKey3(a,b,c,TSIZE) \ -(((((unsigned)(a) + (unsigned)(b)) * DD_P1 + (unsigned)(c)) * DD_P2 ) % TSIZE) +(((((PORT_PTRUINT_T)(a) + (PORT_PTRUINT_T)(b)) * DD_P1 + (PORT_PTRUINT_T)(c)) * DD_P2 ) % TSIZE) #define hashKey4(a,b,c,d,TSIZE) \ -((((((unsigned)(a) + (unsigned)(b)) * DD_P1 + (unsigned)(c)) * DD_P2 + \ - (unsigned)(d)) * DD_P3) % TSIZE) +((((((PORT_PTRUINT_T)(a) + (PORT_PTRUINT_T)(b)) * DD_P1 + (PORT_PTRUINT_T)(c)) * DD_P2 + \ + (PORT_PTRUINT_T)(d)) * DD_P3) % TSIZE) #define hashKey5(a,b,c,d,e,TSIZE) \ -(((((((unsigned)(a) + (unsigned)(b)) * DD_P1 + (unsigned)(c)) * DD_P2 + \ - (unsigned)(d)) * DD_P3 + (unsigned)(e)) * DD_P1) % TSIZE) +(((((((PORT_PTRUINT_T)(a) + (PORT_PTRUINT_T)(b)) * DD_P1 + (PORT_PTRUINT_T)(c)) * DD_P2 + \ + (PORT_PTRUINT_T)(d)) * DD_P3 + (PORT_PTRUINT_T)(e)) * DD_P1) % TSIZE) #ifndef PRT #define PRT(a,t) printf("%s = ", (a)); printf("%6.2f sec\n", (float)(t)/(float)(CLOCKS_PER_SEC)) |