1using System.Runtime.CompilerServices;
12 private const uint
PRIME1 = 2654435761U;
13 private const uint
PRIME2 = 2246822519U;
14 private const uint
PRIME3 = 3266489917U;
15 private const uint
PRIME4 = 668265263U;
16 private const uint
PRIME5 = 374761393U;
29 [MethodImpl(MethodImplOptions.AggressiveInlining)]
32 return (value << offset) | (value >> (32 - offset));
45 [MethodImpl(MethodImplOptions.AggressiveInlining)]
48 return (value << offset) | (value >> (64 - offset));
61 [MethodImpl(MethodImplOptions.AggressiveInlining)]
64 return (value >> offset) | (value << (32 - offset));
77 [MethodImpl(MethodImplOptions.AggressiveInlining)]
80 return (value >> offset) | (value << (64 - offset));
85 return (uint)
new Random().Next();
97 uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
111 uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
112 uint hc2 = (uint)(value2?.GetHashCode() ?? 0);
127 uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
128 uint hc2 = (uint)(value2?.GetHashCode() ?? 0);
129 uint hc3 = (uint)(value3?.GetHashCode() ?? 0);
145 uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
146 uint hc2 = (uint)(value2?.GetHashCode() ?? 0);
147 uint hc3 = (uint)(value3?.GetHashCode() ?? 0);
148 uint hc4 = (uint)(value4?.GetHashCode() ?? 0);
150 Initialize(out uint v1, out uint v2, out uint v3, out uint v4);
157 uint hash =
MixState(v1, v2, v3, v4);
167 uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
168 uint hc2 = (uint)(value2?.GetHashCode() ?? 0);
169 uint hc3 = (uint)(value3?.GetHashCode() ?? 0);
170 uint hc4 = (uint)(value4?.GetHashCode() ?? 0);
171 uint hc5 = (uint)(value5?.GetHashCode() ?? 0);
173 Initialize(out uint v1, out uint v2, out uint v3, out uint v4);
180 uint hash =
MixState(v1, v2, v3, v4);
197 uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
198 uint hc2 = (uint)(value2?.GetHashCode() ?? 0);
199 uint hc3 = (uint)(value3?.GetHashCode() ?? 0);
200 uint hc4 = (uint)(value4?.GetHashCode() ?? 0);
201 uint hc5 = (uint)(value5?.GetHashCode() ?? 0);
202 uint hc6 = (uint)(value6?.GetHashCode() ?? 0);
204 Initialize(out uint v1, out uint v2, out uint v3, out uint v4);
211 uint hash =
MixState(v1, v2, v3, v4);
230 uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
231 uint hc2 = (uint)(value2?.GetHashCode() ?? 0);
232 uint hc3 = (uint)(value3?.GetHashCode() ?? 0);
233 uint hc4 = (uint)(value4?.GetHashCode() ?? 0);
234 uint hc5 = (uint)(value5?.GetHashCode() ?? 0);
235 uint hc6 = (uint)(value6?.GetHashCode() ?? 0);
236 uint hc7 = (uint)(value7?.GetHashCode() ?? 0);
238 Initialize(out uint v1, out uint v2, out uint v3, out uint v4);
245 uint hash =
MixState(v1, v2, v3, v4);
266 uint hc1 = (uint)(value1?.GetHashCode() ?? 0);
267 uint hc2 = (uint)(value2?.GetHashCode() ?? 0);
268 uint hc3 = (uint)(value3?.GetHashCode() ?? 0);
269 uint hc4 = (uint)(value4?.GetHashCode() ?? 0);
270 uint hc5 = (uint)(value5?.GetHashCode() ?? 0);
271 uint hc6 = (uint)(value6?.GetHashCode() ?? 0);
272 uint hc7 = (uint)(value7?.GetHashCode() ?? 0);
273 uint hc8 = (uint)(value8?.GetHashCode() ?? 0);
275 Initialize(out uint v1, out uint v2, out uint v3, out uint v4);
287 uint hash =
MixState(v1, v2, v3, v4);
295 [MethodImpl(MethodImplOptions.AggressiveInlining)]
296 private static void Initialize(out uint v1, out uint v2, out uint v3, out uint v4)
304 [MethodImpl(MethodImplOptions.AggressiveInlining)]
305 private static uint
Round(uint hash, uint input)
310 [MethodImpl(MethodImplOptions.AggressiveInlining)]
316 [MethodImpl(MethodImplOptions.AggressiveInlining)]
317 private static uint
MixState(uint v1, uint v2, uint v3, uint v4)
327 [MethodImpl(MethodImplOptions.AggressiveInlining)]
Implements Combination of HashCode Functions Taken from decompiled source of System....
static uint MixEmptyState()
static int Combine< T1 >(T1 value1)
static int Combine< T1, T2, T3, T4 >(T1 value1, T2 value2, T3 value3, T4 value4)
static int Combine< T1, T2, T3, T4, T5, T6 >(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6)
static uint MixState(uint v1, uint v2, uint v3, uint v4)
static uint QueueRound(uint hash, uint queuedValue)
static ulong RotateRight(ulong value, int offset)
Rotates the specified value right by the specified number of bits. Similar in behavior to the x86 ins...
static int Combine< T1, T2, T3, T4, T5, T6, T7, T8 >(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8)
static uint Round(uint hash, uint input)
static uint MixFinal(uint hash)
static void Initialize(out uint v1, out uint v2, out uint v3, out uint v4)
static uint RotateLeft(uint value, int offset)
Rotates the specified value left by the specified number of bits. Similar in behavior to the x86 inst...
static int Combine< T1, T2, T3 >(T1 value1, T2 value2, T3 value3)
static ulong RotateLeft(ulong value, int offset)
Rotates the specified value left by the specified number of bits. Similar in behavior to the x86 inst...
static int Combine< T1, T2 >(T1 value1, T2 value2)
static int Combine< T1, T2, T3, T4, T5, T6, T7 >(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7)
static uint RotateRight(uint value, int offset)
Rotates the specified value right by the specified number of bits. Similar in behavior to the x86 ins...
static readonly uint s_Seed
static int Combine< T1, T2, T3, T4, T5 >(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5)
static uint GenerateGlobalSeed()
Contains Utility Functions and Classes.