Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\xxhash.c Create Date:2022-07-28 06:56:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:xxh64

Proto:uint64_t xxh64(const void *input, const size_t len, const uint64_t seed)

Type:uint64_t

Parameter:

TypeParameterName
const void *input
const size_tlen
const uint64_tseed
174  p = input
175  b_end = p + len
178  If len >= 32 Then
179  limit = b_end - 32
180  v1 = seed + PRIME64_1 + PRIME64_2
181  v2 = seed + PRIME64_2
182  v3 = seed + 0
183  v4 = seed - PRIME64_1
185  Do
187  p += 8
189  p += 8
191  p += 8
193  p += 8
194  When p <= limit cycle
196  h64 = xxh_rotl64(v1, 1) + xxh_rotl64(v2, 7) + xxh_rotl64(v3, 12) + xxh_rotl64(v4, 18)
198  h64 = xxh64_merge_round(h64, v1)
199  h64 = xxh64_merge_round(h64, v2)
200  h64 = xxh64_merge_round(h64, v3)
201  h64 = xxh64_merge_round(h64, v4)
203  Else
204  h64 = seed + PRIME64_5
207  h64 += len
209  When p + 8 <= b_end cycle
210  k1 = xxh64_round(0, get_unaligned_le64(p))
212  h64 ^= k1
213  h64 = xxh_rotl64(h64, 27) * PRIME64_1 + PRIME64_4
214  p += 8
217  If p + 4 <= b_end Then
218  h64 ^= get_unaligned_le32(p) * PRIME64_1
219  h64 = xxh_rotl64(h64, 23) * PRIME64_2 + PRIME64_3
220  p += 4
223  When p < b_end cycle
224  h64 ^= p * PRIME64_5
225  h64 = xxh_rotl64(h64, 11) * PRIME64_1
226  p++
229  h64 ^= h64 >> 33
230  h64 *= PRIME64_2
231  h64 ^= h64 >> 29
232  h64 *= PRIME64_3
233  h64 ^= h64 >> 32
235  Return h64