-/* Returns the hash of the 'n' 32-bit words at 'p', starting from 'basis'.
- * 'p' must be properly aligned. */
-uint32_t
-hash_words(const uint32_t *p, size_t n, uint32_t basis)
-{
- uint32_t a, b, c;
-
- a = b = c = 0xdeadbeef + (((uint32_t) n) << 2) + basis;
-
- while (n > 3) {
- a += p[0];
- b += p[1];
- c += p[2];
- hash_mix(&a, &b, &c);
- n -= 3;
- p += 3;
- }
-
- switch (n) {
- case 3:
- c += p[2];
- /* fall through */
- case 2:
- b += p[1];
- /* fall through */
- case 1:
- a += p[0];
- hash_final(&a, &b, &c);
- /* fall through */
- case 0:
- break;
- }
- return c;
-}
-