Lines Matching refs:seed
21 static uint32_t crc32c_1(uint32_t seed, uint8_t v) { return _mm_crc32_u8(seed, v); }
22 static uint32_t crc32c_4(uint32_t seed, uint32_t v) { return _mm_crc32_u32(seed, v); }
23 static uint32_t crc32c_8(uint32_t seed, uint64_t v) {
25 return _mm_crc32_u64(seed, v);
27 seed = _mm_crc32_u32(seed, (uint32_t)(v ));
28 return _mm_crc32_u32(seed, (uint32_t)(v >> 32));
33 static uint32_t crc32c_1(uint32_t seed, uint8_t v) { return __crc32cb(seed, v); }
34 static uint32_t crc32c_4(uint32_t seed, uint32_t v) { return __crc32cw(seed, v); }
35 static uint32_t crc32c_8(uint32_t seed, uint64_t v) { return __crc32cd(seed, v); }
88 static uint32_t crc32c_1(uint32_t seed, uint8_t v) {
89 return crc32c_table[(seed ^ v) & 0xff]
90 ^ (seed >> 8);
92 static uint32_t crc32c_4(uint32_t seed, uint32_t v) {
95 seed = crc32c_1(seed, (uint8_t)v);
98 return seed;
100 static uint32_t crc32c_8(uint32_t seed, uint64_t v) {
103 seed = crc32c_1(seed, (uint8_t)v);
106 return seed;
112 inline uint32_t hash_fn(const void* data, size_t len, uint32_t seed) {
118 uint32_t a = seed,
119 b = seed,
120 c = seed;
128 seed = crc32c_4(a, crc32c_4(b,c));
131 seed = crc32c_8(seed, sk_unaligned_load<uint64_t>(ptr));
136 seed = crc32c_1(seed, sk_unaligned_load<uint8_t >(ptr));
140 return seed;