函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\xxhash.c Create Date:2022-07-27 07:53:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:xxh64

函数原型:uint64_t xxh64(const void *input, const size_t len, const uint64_t seed)

返回类型:uint64_t

参数:

类型参数名称
const void *input
const size_tlen
const uint64_tseed
174  p等于input
175  b_end等于plen
178  如果len大于等于32则
179  limit等于b_end减32
180  v1等于seedPRIME64_1PRIME64_2
181  v2等于seedPRIME64_2
182  v3等于seed加0
183  v4等于seedPRIME64_1
185  循环
187  p加等于8
189  p加等于8
191  p加等于8
193  p加等于8
194 p小于等于limit循环
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  否则
204  h64等于seedPRIME64_5
207  h64加等于len
209 p加8小于等于b_end循环
210  k1等于xxh64_round(0, get_unaligned_le64(p))
212  h64异或等于k1
213  h64等于xxh_rotl64(h64, 27)乘PRIME64_1PRIME64_4
214  p加等于8
217  如果p加4小于等于b_end
218  h64异或等于get_unaligned_le32(p)乘PRIME64_1
219  h64等于xxh_rotl64(h64, 23)乘PRIME64_2PRIME64_3
220  p加等于4
223 p小于b_end循环
224  h64异或等于pPRIME64_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  返回:h64