Lines Matching full:hash
30 // This is not a CRC32. It's Just A Hash that uses those instructions because they're fast.
35 uint64_t hash = seed; in hash_fn() local
38 // to hash 8 bytes per step. Both 3 and independent are important: in hash_fn()
40 uint64_t a = hash, in hash_fn()
41 b = hash, in hash_fn()
42 c = hash; in hash_fn()
51 hash = _mm_crc32_u32(a, _mm_crc32_u32(b, c)); in hash_fn()
56 hash = _mm_crc32_u64(hash, unaligned_load<uint64_t>(data)); in hash_fn()
63 hash = _mm_crc32_u64(hash, unaligned_load<uint64_t>(data)); in hash_fn()
69 auto hash32 = (uint32_t)hash; in hash_fn()
87 /*not static*/ inline uint32_t hash_fn(const void* vdata, size_t bytes, uint32_t hash) { in hash_fn() argument
92 // to hash 4 bytes per step. Both 3 and independent are important: in hash_fn()
94 uint32_t a = hash, in hash_fn()
95 b = hash, in hash_fn()
96 c = hash; in hash_fn()
105 hash = _mm_crc32_u32(a, _mm_crc32_u32(b, c)); in hash_fn()
110 hash = _mm_crc32_u32(hash, unaligned_load<uint32_t>(data)); in hash_fn()
117 hash = _mm_crc32_u32(hash, unaligned_load<uint32_t>(data)); in hash_fn()
121 hash = _mm_crc32_u16(hash, unaligned_load<uint16_t>(data)); in hash_fn()
125 hash = _mm_crc32_u8(hash, unaligned_load<uint8_t>(data)); in hash_fn()
127 return hash; in hash_fn()
131 /*not static*/ inline uint32_t hash_fn(const void* vdata, size_t bytes, uint32_t hash) { in hash_fn() argument
134 uint32_t a = hash, in hash_fn()
135 b = hash, in hash_fn()
136 c = hash; in hash_fn()
145 hash = __crc32w(a, __crc32w(b, c)); in hash_fn()
150 hash = __crc32d(hash, unaligned_load<uint64_t>(data)); in hash_fn()
157 hash = __crc32d(hash, unaligned_load<uint64_t>(data)); in hash_fn()
161 hash = __crc32w(hash, unaligned_load<uint32_t>(data)); in hash_fn()
165 hash = __crc32h(hash, unaligned_load<uint16_t>(data)); in hash_fn()
169 hash = __crc32b(hash, unaligned_load<uint8_t>(data)); in hash_fn()
171 return hash; in hash_fn()
176 /*not static*/ inline uint32_t hash_fn(const void* vdata, size_t bytes, uint32_t hash) { in hash_fn() argument
188 hash ^= k; in hash_fn()
189 hash = (hash << 13) | (hash >> 19); in hash_fn()
190 hash *= 5; in hash_fn()
191 hash += 0xe6546b64; in hash_fn()
206 hash ^= k; in hash_fn()
209 hash ^= original_bytes; in hash_fn()
210 return SkChecksum::Mix(hash); in hash_fn()