MCPcopy Create free account
hub / github.com/apache/cloudberry / hash_bytes_uint32

Function hash_bytes_uint32

src/common/hashfn.c:626–640  ·  view source on GitHub ↗

* hash_bytes_uint32() -- hash a 32-bit value to a 32-bit value * * This has the same result as * hash_bytes(&k, sizeof(uint32)) * but is faster and doesn't force the caller to store k into memory. */

Source from the content-addressed store, hash-verified

624 * but is faster and doesn't force the caller to store k into memory.
625 */
626uint32
627hash_bytes_uint32(uint32 k)
628{
629 uint32 a,
630 b,
631 c;
632
633 a = b = c = 0x9e3779b9 + (uint32) sizeof(uint32) + 3923095;
634 a += k;
635
636 final(a, b, c);
637
638 /* report the result */
639 return c;
640}
641
642/*
643 * hash_bytes_uint32_extended() -- hash 32-bit value to 64-bit value, with seed

Callers 3

hashagg_spill_tupleFunction · 0.85
uint32_hashFunction · 0.85
hash_uint32Function · 0.85

Calls 1

finalFunction · 0.85

Tested by

no test coverage detected