/* From lookup3.c, by Bob Jenkins, May 2006, Public Domain. */ #ifndef _JENKINS_LOOKUP3_H_ #define _JENKINS_LOOKUP3_H_ #include /* defines uint32_t etc */ /* * HashJenkins3: return 2 32-bit hash values * * This is identical to hashlittle(), except it returns two 32-bit hash * values instead of just one. This is good enough for hash table * lookup with 2^^64 buckets, or if you want a second hash if you're not * happy with the first, or if you want a probably-unique 64-bit ID for * the key. *pc is better mixed than *pb, so use *pc first. If you want * a 64-bit value do something like "*pc + (((uint64_t)*pb)<<32)". */ void HashJenkins3( const void *key, /* the key to hash */ size_t length, /* length of the key */ uint32_t *pc, /* IN: primary initval, OUT: primary hash */ uint32_t *pb); /* IN: secondary initval, OUT: secondary hash */ #endif