Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:xxh32

Proto:uint32_t xxh32(const void *input, const size_t len, const uint32_t seed)

Type:uint32_t

Parameter:

TypeParameterName
const void *input
const size_tlen
const uint32_tseed
104  p = input
105  b_end = p + len
108  If len >= 16 Then
109  limit = b_end - 16
110  v1 = seed + -************************************** Constants + PRIME32_2
111  v2 = seed + PRIME32_2
112  v3 = seed + 0
113  v4 = seed - -************************************** Constants
115  Do
117  p += 4
119  p += 4
121  p += 4
123  p += 4
124  When p <= limit cycle
126  h32 = -************************************** Macros(v1, 1) + -************************************** Macros(v2, 7) + -************************************** Macros(v3, 12) + -************************************** Macros(v4, 18)
128  Else
129  h32 = seed + PRIME32_5
132  h32 += len
134  When p + 4 <= b_end cycle
135  h32 += get_unaligned_le32(p) * PRIME32_3
136  h32 = -************************************** Macros(h32, 17) * PRIME32_4
137  p += 4
140  When p < b_end cycle
141  h32 += p * PRIME32_5
142  h32 = -************************************** Macros(h32, 11) * -************************************** Constants
143  p++
146  h32 ^= h32 >> 15
147  h32 *= PRIME32_2
148  h32 ^= h32 >> 13
149  h32 *= PRIME32_3
150  h32 ^= h32 >> 16
152  Return h32
Caller
NameDescribe
xxhashxxhash() - calculate wordsize hash of the input with a given seed*@input: The data to hash