1 | // Copyright (c) 2014 Google, Inc. |
2 | // |
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
4 | // of this software and associated documentation files (the "Software"), to deal |
5 | // in the Software without restriction, including without limitation the rights |
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
7 | // copies of the Software, and to permit persons to whom the Software is |
8 | // furnished to do so, subject to the following conditions: |
9 | // |
10 | // The above copyright notice and this permission notice shall be included in |
11 | // all copies or substantial portions of the Software. |
12 | // |
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
19 | // THE SOFTWARE. |
20 | // |
21 | // FarmHash, by Geoff Pike |
22 | |
23 | #include "farmhash.h" |
24 | // FARMHASH ASSUMPTIONS: Modify as needed, or use -DFARMHASH_ASSUME_SSE42 etc. |
25 | // Note that if you use -DFARMHASH_ASSUME_SSE42 you likely need -msse42 |
26 | // (or its equivalent for your compiler); if you use -DFARMHASH_ASSUME_AESNI |
27 | // you likely need -maes (or its equivalent for your compiler). |
28 | |
29 | #ifdef FARMHASH_ASSUME_SSSE3 |
30 | #undef FARMHASH_ASSUME_SSSE3 |
31 | #define FARMHASH_ASSUME_SSSE3 1 |
32 | #endif |
33 | |
34 | #ifdef FARMHASH_ASSUME_SSE41 |
35 | #undef FARMHASH_ASSUME_SSE41 |
36 | #define FARMHASH_ASSUME_SSE41 1 |
37 | #endif |
38 | |
39 | #ifdef FARMHASH_ASSUME_SSE42 |
40 | #undef FARMHASH_ASSUME_SSE42 |
41 | #define FARMHASH_ASSUME_SSE42 1 |
42 | #endif |
43 | |
44 | #ifdef FARMHASH_ASSUME_AESNI |
45 | #undef FARMHASH_ASSUME_AESNI |
46 | #define FARMHASH_ASSUME_AESNI 1 |
47 | #endif |
48 | |
49 | #ifdef FARMHASH_ASSUME_AVX |
50 | #undef FARMHASH_ASSUME_AVX |
51 | #define FARMHASH_ASSUME_AVX 1 |
52 | #endif |
53 | |
54 | #if !defined(FARMHASH_CAN_USE_CXX11) && defined(LANG_CXX11) |
55 | #define FARMHASH_CAN_USE_CXX11 1 |
56 | #else |
57 | #undef FARMHASH_CAN_USE_CXX11 |
58 | #define FARMHASH_CAN_USE_CXX11 0 |
59 | #endif |
60 | |
61 | // FARMHASH PORTABILITY LAYER: Runtime error if misconfigured |
62 | |
63 | #ifndef FARMHASH_DIE_IF_MISCONFIGURED |
64 | #define FARMHASH_DIE_IF_MISCONFIGURED do { *(char*)(len % 17) = 0; } while (0) |
65 | #endif |
66 | |
67 | // FARMHASH PORTABILITY LAYER: "static inline" or similar |
68 | |
69 | #ifndef STATIC_INLINE |
70 | #define STATIC_INLINE static inline |
71 | #endif |
72 | |
73 | // FARMHASH PORTABILITY LAYER: LIKELY and UNLIKELY |
74 | |
75 | #if !defined(LIKELY) |
76 | #if defined(FARMHASH_NO_BUILTIN_EXPECT) || (defined(FARMHASH_OPTIONAL_BUILTIN_EXPECT) && !defined(HAVE_BUILTIN_EXPECT)) |
77 | #define LIKELY(x) (x) |
78 | #else |
79 | #define LIKELY(x) (__builtin_expect(!!(x), 1)) |
80 | #endif |
81 | #endif |
82 | |
83 | #undef UNLIKELY |
84 | #define UNLIKELY(x) !LIKELY(!(x)) |
85 | |
86 | // FARMHASH PORTABILITY LAYER: endianness and byteswapping functions |
87 | |
88 | #ifdef WORDS_BIGENDIAN |
89 | #undef FARMHASH_BIG_ENDIAN |
90 | #define FARMHASH_BIG_ENDIAN 1 |
91 | #endif |
92 | |
93 | #if defined(FARMHASH_LITTLE_ENDIAN) && defined(FARMHASH_BIG_ENDIAN) |
94 | #error |
95 | #endif |
96 | |
97 | #if !defined(FARMHASH_LITTLE_ENDIAN) && !defined(FARMHASH_BIG_ENDIAN) |
98 | #define FARMHASH_UNKNOWN_ENDIAN 1 |
99 | #endif |
100 | |
101 | #if !defined(bswap_32) || !defined(bswap_64) |
102 | #undef bswap_32 |
103 | #undef bswap_64 |
104 | |
105 | #if defined(HAVE_BUILTIN_BSWAP) || defined(__clang__) || \ |
106 | (defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || \ |
107 | __GNUC__ >= 5)) |
108 | // Easy case for bswap: no header file needed. |
109 | #define bswap_32(x) __builtin_bswap32(x) |
110 | #define bswap_64(x) __builtin_bswap64(x) |
111 | #endif |
112 | |
113 | #endif |
114 | |
115 | #if defined(FARMHASH_UNKNOWN_ENDIAN) || !defined(bswap_64) |
116 | |
117 | #ifdef _MSC_VER |
118 | |
119 | #undef bswap_32 |
120 | #undef bswap_64 |
121 | #define bswap_32(x) _byteswap_ulong(x) |
122 | #define bswap_64(x) _byteswap_uint64(x) |
123 | |
124 | #elif defined(__APPLE__) |
125 | |
126 | // Mac OS X / Darwin features |
127 | #include <libkern/OSByteOrder.h> |
128 | #undef bswap_32 |
129 | #undef bswap_64 |
130 | #define bswap_32(x) OSSwapInt32(x) |
131 | #define bswap_64(x) OSSwapInt64(x) |
132 | |
133 | #elif defined(__sun) || defined(sun) |
134 | |
135 | #include <sys/byteorder.h> |
136 | #undef bswap_32 |
137 | #undef bswap_64 |
138 | #define bswap_32(x) BSWAP_32(x) |
139 | #define bswap_64(x) BSWAP_64(x) |
140 | |
141 | #elif defined(__FreeBSD__) |
142 | |
143 | #include <sys/endian.h> |
144 | #undef bswap_32 |
145 | #undef bswap_64 |
146 | #define bswap_32(x) bswap32(x) |
147 | #define bswap_64(x) bswap64(x) |
148 | |
149 | #elif defined(__OpenBSD__) |
150 | |
151 | #include <sys/types.h> |
152 | #undef bswap_32 |
153 | #undef bswap_64 |
154 | #define bswap_32(x) swap32(x) |
155 | #define bswap_64(x) swap64(x) |
156 | |
157 | #elif defined(__NetBSD__) |
158 | |
159 | #include <sys/types.h> |
160 | #include <machine/bswap.h> |
161 | #if defined(__BSWAP_RENAME) && !defined(__bswap_32) |
162 | #undef bswap_32 |
163 | #undef bswap_64 |
164 | #define bswap_32(x) bswap32(x) |
165 | #define bswap_64(x) bswap64(x) |
166 | #endif |
167 | |
168 | #else |
169 | |
170 | #undef bswap_32 |
171 | #undef bswap_64 |
172 | #include <byteswap.h> |
173 | |
174 | #endif |
175 | |
176 | #ifdef WORDS_BIGENDIAN |
177 | #define FARMHASH_BIG_ENDIAN 1 |
178 | #endif |
179 | |
180 | #endif |
181 | |
182 | #ifdef FARMHASH_BIG_ENDIAN |
183 | #define uint32_in_expected_order(x) (bswap_32(x)) |
184 | #define uint64_in_expected_order(x) (bswap_64(x)) |
185 | #else |
186 | #define uint32_in_expected_order(x) (x) |
187 | #define uint64_in_expected_order(x) (x) |
188 | #endif |
189 | |
190 | namespace NAMESPACE_FOR_HASH_FUNCTIONS { |
191 | |
192 | STATIC_INLINE uint64_t Fetch64(const char *p) { |
193 | uint64_t result; |
194 | memcpy(&result, p, sizeof(result)); |
195 | return uint64_in_expected_order(result); |
196 | } |
197 | |
198 | STATIC_INLINE uint32_t Fetch32(const char *p) { |
199 | uint32_t result; |
200 | memcpy(&result, p, sizeof(result)); |
201 | return uint32_in_expected_order(result); |
202 | } |
203 | |
204 | STATIC_INLINE uint32_t Bswap32(uint32_t val) { return bswap_32(val); } |
205 | STATIC_INLINE uint64_t Bswap64(uint64_t val) { return bswap_64(val); } |
206 | |
207 | // FARMHASH PORTABILITY LAYER: bitwise rot |
208 | |
209 | STATIC_INLINE uint32_t BasicRotate32(uint32_t val, int shift) { |
210 | // Avoid shifting by 32: doing so yields an undefined result. |
211 | return shift == 0 ? val : ((val >> shift) | (val << (32 - shift))); |
212 | } |
213 | |
214 | STATIC_INLINE uint64_t BasicRotate64(uint64_t val, int shift) { |
215 | // Avoid shifting by 64: doing so yields an undefined result. |
216 | return shift == 0 ? val : ((val >> shift) | (val << (64 - shift))); |
217 | } |
218 | |
219 | #if defined(_MSC_VER) && defined(FARMHASH_ROTR) |
220 | |
221 | STATIC_INLINE uint32_t Rotate32(uint32_t val, int shift) { |
222 | return sizeof(unsigned long) == sizeof(val) ? |
223 | _lrotr(val, shift) : |
224 | BasicRotate32(val, shift); |
225 | } |
226 | |
227 | STATIC_INLINE uint64_t Rotate64(uint64_t val, int shift) { |
228 | return sizeof(unsigned long) == sizeof(val) ? |
229 | _lrotr(val, shift) : |
230 | BasicRotate64(val, shift); |
231 | } |
232 | |
233 | #else |
234 | |
235 | STATIC_INLINE uint32_t Rotate32(uint32_t val, int shift) { |
236 | return BasicRotate32(val, shift); |
237 | } |
238 | STATIC_INLINE uint64_t Rotate64(uint64_t val, int shift) { |
239 | return BasicRotate64(val, shift); |
240 | } |
241 | |
242 | #endif |
243 | |
244 | } // namespace NAMESPACE_FOR_HASH_FUNCTIONS |
245 | |
246 | // FARMHASH PORTABILITY LAYER: debug mode or max speed? |
247 | // One may use -DFARMHASH_DEBUG=1 or -DFARMHASH_DEBUG=0 to force the issue. |
248 | |
249 | #if !defined(FARMHASH_DEBUG) && (!defined(NDEBUG) || defined(_DEBUG)) |
250 | #define FARMHASH_DEBUG 1 |
251 | #endif |
252 | |
253 | #undef debug_mode |
254 | #if FARMHASH_DEBUG |
255 | #define debug_mode 1 |
256 | #else |
257 | #define debug_mode 0 |
258 | #endif |
259 | |
260 | // PLATFORM-SPECIFIC FUNCTIONS AND MACROS |
261 | |
262 | #undef x86_64 |
263 | #if defined (__x86_64) || defined (__x86_64__) |
264 | #define x86_64 1 |
265 | #else |
266 | #define x86_64 0 |
267 | #endif |
268 | |
269 | #undef x86 |
270 | #if defined(__i386__) || defined(__i386) || defined(__X86__) |
271 | #define x86 1 |
272 | #else |
273 | #define x86 x86_64 |
274 | #endif |
275 | |
276 | #if !defined(is_64bit) |
277 | #define is_64bit (x86_64 || (sizeof(void*) == 8)) |
278 | #endif |
279 | |
280 | #undef can_use_ssse3 |
281 | #if defined(__SSSE3__) || defined(FARMHASH_ASSUME_SSSE3) |
282 | |
283 | #include <immintrin.h> |
284 | #define can_use_ssse3 1 |
285 | // Now we can use _mm_hsub_epi16 and so on. |
286 | |
287 | #else |
288 | #define can_use_ssse3 0 |
289 | #endif |
290 | |
291 | #undef can_use_sse41 |
292 | #if defined(__SSE4_1__) || defined(FARMHASH_ASSUME_SSE41) |
293 | |
294 | #include <immintrin.h> |
295 | #define can_use_sse41 1 |
296 | // Now we can use _mm_insert_epi64 and so on. |
297 | |
298 | #else |
299 | #define can_use_sse41 0 |
300 | #endif |
301 | |
302 | #undef can_use_sse42 |
303 | #if defined(__SSE4_2__) || defined(FARMHASH_ASSUME_SSE42) |
304 | |
305 | #include <nmmintrin.h> |
306 | #define can_use_sse42 1 |
307 | // Now we can use _mm_crc32_u{32,16,8}. And on 64-bit platforms, _mm_crc32_u64. |
308 | |
309 | #else |
310 | #define can_use_sse42 0 |
311 | #endif |
312 | |
313 | #undef can_use_aesni |
314 | #if defined(__AES__) || defined(FARMHASH_ASSUME_AESNI) |
315 | |
316 | #include <wmmintrin.h> |
317 | #define can_use_aesni 1 |
318 | // Now we can use _mm_aesimc_si128 and so on. |
319 | |
320 | #else |
321 | #define can_use_aesni 0 |
322 | #endif |
323 | |
324 | #undef can_use_avx |
325 | #if defined(__AVX__) || defined(FARMHASH_ASSUME_AVX) |
326 | |
327 | #include <immintrin.h> |
328 | #define can_use_avx 1 |
329 | |
330 | #else |
331 | #define can_use_avx 0 |
332 | #endif |
333 | |
334 | #if can_use_ssse3 || can_use_sse41 || can_use_sse42 || can_use_aesni || can_use_avx |
335 | STATIC_INLINE __m128i Fetch128(const char* s) { |
336 | return _mm_loadu_si128(reinterpret_cast<const __m128i*>(s)); |
337 | } |
338 | #endif |
339 | // Building blocks for hash functions |
340 | |
341 | // std::swap() was in <algorithm> but is in <utility> from C++11 on. |
342 | #if !FARMHASH_CAN_USE_CXX11 |
343 | #include <algorithm> |
344 | #endif |
345 | |
346 | #undef PERMUTE3 |
347 | #define PERMUTE3(a, b, c) do { std::swap(a, b); std::swap(a, c); } while (0) |
348 | |
349 | namespace NAMESPACE_FOR_HASH_FUNCTIONS { |
350 | |
351 | // Some primes between 2^63 and 2^64 for various uses. |
352 | static const uint64_t k0 = 0xc3a5c85c97cb3127ULL; |
353 | static const uint64_t k1 = 0xb492b66fbe98f273ULL; |
354 | static const uint64_t k2 = 0x9ae16a3b2f90404fULL; |
355 | |
356 | // Magic numbers for 32-bit hashing. Copied from Murmur3. |
357 | static const uint32_t c1 = 0xcc9e2d51; |
358 | static const uint32_t c2 = 0x1b873593; |
359 | |
360 | // A 32-bit to 32-bit integer hash copied from Murmur3. |
361 | STATIC_INLINE uint32_t fmix(uint32_t h) |
362 | { |
363 | h ^= h >> 16; |
364 | h *= 0x85ebca6b; |
365 | h ^= h >> 13; |
366 | h *= 0xc2b2ae35; |
367 | h ^= h >> 16; |
368 | return h; |
369 | } |
370 | |
371 | STATIC_INLINE uint32_t Mur(uint32_t a, uint32_t h) { |
372 | // Helper from Murmur3 for combining two 32-bit values. |
373 | a *= c1; |
374 | a = Rotate32(a, 17); |
375 | a *= c2; |
376 | h ^= a; |
377 | h = Rotate32(h, 19); |
378 | return h * 5 + 0xe6546b64; |
379 | } |
380 | |
381 | template <typename T> STATIC_INLINE T DebugTweak(T x) { |
382 | if (debug_mode) { |
383 | if (sizeof(x) == 4) { |
384 | x = ~Bswap32(x * c1); |
385 | } else { |
386 | x = ~Bswap64(x * k1); |
387 | } |
388 | } |
389 | return x; |
390 | } |
391 | |
392 | template <> uint128_t DebugTweak(uint128_t x) { |
393 | if (debug_mode) { |
394 | uint64_t y = DebugTweak(Uint128Low64(x)); |
395 | uint64_t z = DebugTweak(Uint128High64(x)); |
396 | y += z; |
397 | z += y; |
398 | x = Uint128(y, z * k1); |
399 | } |
400 | return x; |
401 | } |
402 | |
403 | } // namespace NAMESPACE_FOR_HASH_FUNCTIONS |
404 | |
405 | using namespace std; |
406 | using namespace NAMESPACE_FOR_HASH_FUNCTIONS; |
407 | namespace farmhashna { |
408 | #undef Fetch |
409 | #define Fetch Fetch64 |
410 | |
411 | #undef Rotate |
412 | #define Rotate Rotate64 |
413 | |
414 | #undef Bswap |
415 | #define Bswap Bswap64 |
416 | |
417 | STATIC_INLINE uint64_t ShiftMix(uint64_t val) { |
418 | return val ^ (val >> 47); |
419 | } |
420 | |
421 | STATIC_INLINE uint64_t HashLen16(uint64_t u, uint64_t v) { |
422 | return Hash128to64(Uint128(u, v)); |
423 | } |
424 | |
425 | STATIC_INLINE uint64_t HashLen16(uint64_t u, uint64_t v, uint64_t mul) { |
426 | // Murmur-inspired hashing. |
427 | uint64_t a = (u ^ v) * mul; |
428 | a ^= (a >> 47); |
429 | uint64_t b = (v ^ a) * mul; |
430 | b ^= (b >> 47); |
431 | b *= mul; |
432 | return b; |
433 | } |
434 | |
435 | STATIC_INLINE uint64_t HashLen0to16(const char *s, size_t len) { |
436 | if (len >= 8) { |
437 | uint64_t mul = k2 + len * 2; |
438 | uint64_t a = Fetch(s) + k2; |
439 | uint64_t b = Fetch(s + len - 8); |
440 | uint64_t c = Rotate(b, 37) * mul + a; |
441 | uint64_t d = (Rotate(a, 25) + b) * mul; |
442 | return HashLen16(c, d, mul); |
443 | } |
444 | if (len >= 4) { |
445 | uint64_t mul = k2 + len * 2; |
446 | uint64_t a = Fetch32(s); |
447 | return HashLen16(len + (a << 3), Fetch32(s + len - 4), mul); |
448 | } |
449 | if (len > 0) { |
450 | uint8_t a = s[0]; |
451 | uint8_t b = s[len >> 1]; |
452 | uint8_t c = s[len - 1]; |
453 | uint32_t y = static_cast<uint32_t>(a) + (static_cast<uint32_t>(b) << 8); |
454 | uint32_t z = len + (static_cast<uint32_t>(c) << 2); |
455 | return ShiftMix(y * k2 ^ z * k0) * k2; |
456 | } |
457 | return k2; |
458 | } |
459 | |
460 | // This probably works well for 16-byte strings as well, but it may be overkill |
461 | // in that case. |
462 | STATIC_INLINE uint64_t HashLen17to32(const char *s, size_t len) { |
463 | uint64_t mul = k2 + len * 2; |
464 | uint64_t a = Fetch(s) * k1; |
465 | uint64_t b = Fetch(s + 8); |
466 | uint64_t c = Fetch(s + len - 8) * mul; |
467 | uint64_t d = Fetch(s + len - 16) * k2; |
468 | return HashLen16(Rotate(a + b, 43) + Rotate(c, 30) + d, |
469 | a + Rotate(b + k2, 18) + c, mul); |
470 | } |
471 | |
472 | // Return a 16-byte hash for 48 bytes. Quick and dirty. |
473 | // Callers do best to use "random-looking" values for a and b. |
474 | STATIC_INLINE pair<uint64_t, uint64_t> WeakHashLen32WithSeeds( |
475 | uint64_t w, uint64_t x, uint64_t y, uint64_t z, uint64_t a, uint64_t b) { |
476 | a += w; |
477 | b = Rotate(b + a + z, 21); |
478 | uint64_t c = a; |
479 | a += x; |
480 | a += y; |
481 | b += Rotate(a, 44); |
482 | return make_pair(a + z, b + c); |
483 | } |
484 | |
485 | // Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty. |
486 | STATIC_INLINE pair<uint64_t, uint64_t> WeakHashLen32WithSeeds( |
487 | const char* s, uint64_t a, uint64_t b) { |
488 | return WeakHashLen32WithSeeds(Fetch(s), |
489 | Fetch(s + 8), |
490 | Fetch(s + 16), |
491 | Fetch(s + 24), |
492 | a, |
493 | b); |
494 | } |
495 | |
496 | // Return an 8-byte hash for 33 to 64 bytes. |
497 | STATIC_INLINE uint64_t HashLen33to64(const char *s, size_t len) { |
498 | uint64_t mul = k2 + len * 2; |
499 | uint64_t a = Fetch(s) * k2; |
500 | uint64_t b = Fetch(s + 8); |
501 | uint64_t c = Fetch(s + len - 8) * mul; |
502 | uint64_t d = Fetch(s + len - 16) * k2; |
503 | uint64_t y = Rotate(a + b, 43) + Rotate(c, 30) + d; |
504 | uint64_t z = HashLen16(y, a + Rotate(b + k2, 18) + c, mul); |
505 | uint64_t e = Fetch(s + 16) * mul; |
506 | uint64_t f = Fetch(s + 24); |
507 | uint64_t g = (y + Fetch(s + len - 32)) * mul; |
508 | uint64_t h = (z + Fetch(s + len - 24)) * mul; |
509 | return HashLen16(Rotate(e + f, 43) + Rotate(g, 30) + h, |
510 | e + Rotate(f + a, 18) + g, mul); |
511 | } |
512 | |
513 | uint64_t Hash64(const char *s, size_t len) { |
514 | const uint64_t seed = 81; |
515 | if (len <= 32) { |
516 | if (len <= 16) { |
517 | return HashLen0to16(s, len); |
518 | } else { |
519 | return HashLen17to32(s, len); |
520 | } |
521 | } else if (len <= 64) { |
522 | return HashLen33to64(s, len); |
523 | } |
524 | |
525 | // For strings over 64 bytes we loop. Internal state consists of |
526 | // 56 bytes: v, w, x, y, and z. |
527 | uint64_t x = seed; |
528 | uint64_t y = seed * k1 + 113; |
529 | uint64_t z = ShiftMix(y * k2 + 113) * k2; |
530 | pair<uint64_t, uint64_t> v = make_pair(0, 0); |
531 | pair<uint64_t, uint64_t> w = make_pair(0, 0); |
532 | x = x * k2 + Fetch(s); |
533 | |
534 | // Set end so that after the loop we have 1 to 64 bytes left to process. |
535 | const char* end = s + ((len - 1) / 64) * 64; |
536 | const char* last64 = end + ((len - 1) & 63) - 63; |
537 | assert(s + len - 64 == last64); |
538 | do { |
539 | x = Rotate(x + y + v.first + Fetch(s + 8), 37) * k1; |
540 | y = Rotate(y + v.second + Fetch(s + 48), 42) * k1; |
541 | x ^= w.second; |
542 | y += v.first + Fetch(s + 40); |
543 | z = Rotate(z + w.first, 33) * k1; |
544 | v = WeakHashLen32WithSeeds(s, v.second * k1, x + w.first); |
545 | w = WeakHashLen32WithSeeds(s + 32, z + w.second, y + Fetch(s + 16)); |
546 | std::swap(z, x); |
547 | s += 64; |
548 | } while (s != end); |
549 | uint64_t mul = k1 + ((z & 0xff) << 1); |
550 | // Make s point to the last 64 bytes of input. |
551 | s = last64; |
552 | w.first += ((len - 1) & 63); |
553 | v.first += w.first; |
554 | w.first += v.first; |
555 | x = Rotate(x + y + v.first + Fetch(s + 8), 37) * mul; |
556 | y = Rotate(y + v.second + Fetch(s + 48), 42) * mul; |
557 | x ^= w.second * 9; |
558 | y += v.first * 9 + Fetch(s + 40); |
559 | z = Rotate(z + w.first, 33) * mul; |
560 | v = WeakHashLen32WithSeeds(s, v.second * mul, x + w.first); |
561 | w = WeakHashLen32WithSeeds(s + 32, z + w.second, y + Fetch(s + 16)); |
562 | std::swap(z, x); |
563 | return HashLen16(HashLen16(v.first, w.first, mul) + ShiftMix(y) * k0 + z, |
564 | HashLen16(v.second, w.second, mul) + x, |
565 | mul); |
566 | } |
567 | |
568 | uint64_t Hash64WithSeeds(const char *s, size_t len, uint64_t seed0, uint64_t seed1); |
569 | |
570 | uint64_t Hash64WithSeed(const char *s, size_t len, uint64_t seed) { |
571 | return Hash64WithSeeds(s, len, k2, seed); |
572 | } |
573 | |
574 | uint64_t Hash64WithSeeds(const char *s, size_t len, uint64_t seed0, uint64_t seed1) { |
575 | return HashLen16(Hash64(s, len) - seed0, seed1); |
576 | } |
577 | } // namespace farmhashna |
578 | namespace farmhashuo { |
579 | #undef Fetch |
580 | #define Fetch Fetch64 |
581 | |
582 | #undef Rotate |
583 | #define Rotate Rotate64 |
584 | |
585 | STATIC_INLINE uint64_t H(uint64_t x, uint64_t y, uint64_t mul, int r) { |
586 | uint64_t a = (x ^ y) * mul; |
587 | a ^= (a >> 47); |
588 | uint64_t b = (y ^ a) * mul; |
589 | return Rotate(b, r) * mul; |
590 | } |
591 | |
592 | uint64_t Hash64WithSeeds(const char *s, size_t len, |
593 | uint64_t seed0, uint64_t seed1) { |
594 | if (len <= 64) { |
595 | return farmhashna::Hash64WithSeeds(s, len, seed0, seed1); |
596 | } |
597 | |
598 | // For strings over 64 bytes we loop. Internal state consists of |
599 | // 64 bytes: u, v, w, x, y, and z. |
600 | uint64_t x = seed0; |
601 | uint64_t y = seed1 * k2 + 113; |
602 | uint64_t z = farmhashna::ShiftMix(y * k2) * k2; |
603 | pair<uint64_t, uint64_t> v = make_pair(seed0, seed1); |
604 | pair<uint64_t, uint64_t> w = make_pair(0, 0); |
605 | uint64_t u = x - z; |
606 | x *= k2; |
607 | uint64_t mul = k2 + (u & 0x82); |
608 | |
609 | // Set end so that after the loop we have 1 to 64 bytes left to process. |
610 | const char* end = s + ((len - 1) / 64) * 64; |
611 | const char* last64 = end + ((len - 1) & 63) - 63; |
612 | assert(s + len - 64 == last64); |
613 | do { |
614 | uint64_t a0 = Fetch(s); |
615 | uint64_t a1 = Fetch(s + 8); |
616 | uint64_t a2 = Fetch(s + 16); |
617 | uint64_t a3 = Fetch(s + 24); |
618 | uint64_t a4 = Fetch(s + 32); |
619 | uint64_t a5 = Fetch(s + 40); |
620 | uint64_t a6 = Fetch(s + 48); |
621 | uint64_t a7 = Fetch(s + 56); |
622 | x += a0 + a1; |
623 | y += a2; |
624 | z += a3; |
625 | v.first += a4; |
626 | v.second += a5 + a1; |
627 | w.first += a6; |
628 | w.second += a7; |
629 | |
630 | x = Rotate(x, 26); |
631 | x *= 9; |
632 | y = Rotate(y, 29); |
633 | z *= mul; |
634 | v.first = Rotate(v.first, 33); |
635 | v.second = Rotate(v.second, 30); |
636 | w.first ^= x; |
637 | w.first *= 9; |
638 | z = Rotate(z, 32); |
639 | z += w.second; |
640 | w.second += z; |
641 | z *= 9; |
642 | std::swap(u, y); |
643 | |
644 | z += a0 + a6; |
645 | v.first += a2; |
646 | v.second += a3; |
647 | w.first += a4; |
648 | w.second += a5 + a6; |
649 | x += a1; |
650 | y += a7; |
651 | |
652 | y += v.first; |
653 | v.first += x - y; |
654 | v.second += w.first; |
655 | w.first += v.second; |
656 | w.second += x - y; |
657 | x += w.second; |
658 | w.second = Rotate(w.second, 34); |
659 | std::swap(u, z); |
660 | s += 64; |
661 | } while (s != end); |
662 | // Make s point to the last 64 bytes of input. |
663 | s = last64; |
664 | u *= 9; |
665 | v.second = Rotate(v.second, 28); |
666 | v.first = Rotate(v.first, 20); |
667 | w.first += ((len - 1) & 63); |
668 | u += y; |
669 | y += u; |
670 | x = Rotate(y - x + v.first + Fetch(s + 8), 37) * mul; |
671 | y = Rotate(y ^ v.second ^ Fetch(s + 48), 42) * mul; |
672 | x ^= w.second * 9; |
673 | y += v.first + Fetch(s + 40); |
674 | z = Rotate(z + w.first, 33) * mul; |
675 | v = farmhashna::WeakHashLen32WithSeeds(s, v.second * mul, x + w.first); |
676 | w = farmhashna::WeakHashLen32WithSeeds(s + 32, z + w.second, y + Fetch(s + 16)); |
677 | return H(farmhashna::HashLen16(v.first + x, w.first ^ y, mul) + z - u, |
678 | H(v.second + y, w.second + z, k2, 30) ^ x, |
679 | k2, |
680 | 31); |
681 | } |
682 | |
683 | uint64_t Hash64WithSeed(const char *s, size_t len, uint64_t seed) { |
684 | return len <= 64 ? farmhashna::Hash64WithSeed(s, len, seed) : |
685 | Hash64WithSeeds(s, len, 0, seed); |
686 | } |
687 | |
688 | uint64_t Hash64(const char *s, size_t len) { |
689 | return len <= 64 ? farmhashna::Hash64(s, len) : |
690 | Hash64WithSeeds(s, len, 81, 0); |
691 | } |
692 | } // namespace farmhashuo |
693 | namespace farmhashxo { |
694 | #undef Fetch |
695 | #define Fetch Fetch64 |
696 | |
697 | #undef Rotate |
698 | #define Rotate Rotate64 |
699 | |
700 | STATIC_INLINE uint64_t H32(const char *s, size_t len, uint64_t mul, |
701 | uint64_t seed0 = 0, uint64_t seed1 = 0) { |
702 | uint64_t a = Fetch(s) * k1; |
703 | uint64_t b = Fetch(s + 8); |
704 | uint64_t c = Fetch(s + len - 8) * mul; |
705 | uint64_t d = Fetch(s + len - 16) * k2; |
706 | uint64_t u = Rotate(a + b, 43) + Rotate(c, 30) + d + seed0; |
707 | uint64_t v = a + Rotate(b + k2, 18) + c + seed1; |
708 | a = farmhashna::ShiftMix((u ^ v) * mul); |
709 | b = farmhashna::ShiftMix((v ^ a) * mul); |
710 | return b; |
711 | } |
712 | |
713 | // Return an 8-byte hash for 33 to 64 bytes. |
714 | STATIC_INLINE uint64_t HashLen33to64(const char *s, size_t len) { |
715 | uint64_t mul0 = k2 - 30; |
716 | uint64_t mul1 = k2 - 30 + 2 * len; |
717 | uint64_t h0 = H32(s, 32, mul0); |
718 | uint64_t h1 = H32(s + len - 32, 32, mul1); |
719 | return ((h1 * mul1) + h0) * mul1; |
720 | } |
721 | |
722 | // Return an 8-byte hash for 65 to 96 bytes. |
723 | STATIC_INLINE uint64_t HashLen65to96(const char *s, size_t len) { |
724 | uint64_t mul0 = k2 - 114; |
725 | uint64_t mul1 = k2 - 114 + 2 * len; |
726 | uint64_t h0 = H32(s, 32, mul0); |
727 | uint64_t h1 = H32(s + 32, 32, mul1); |
728 | uint64_t h2 = H32(s + len - 32, 32, mul1, h0, h1); |
729 | return (h2 * 9 + (h0 >> 17) + (h1 >> 21)) * mul1; |
730 | } |
731 | |
732 | uint64_t Hash64(const char *s, size_t len) { |
733 | if (len <= 32) { |
734 | if (len <= 16) { |
735 | return farmhashna::HashLen0to16(s, len); |
736 | } else { |
737 | return farmhashna::HashLen17to32(s, len); |
738 | } |
739 | } else if (len <= 64) { |
740 | return HashLen33to64(s, len); |
741 | } else if (len <= 96) { |
742 | return HashLen65to96(s, len); |
743 | } else if (len <= 256) { |
744 | return farmhashna::Hash64(s, len); |
745 | } else { |
746 | return farmhashuo::Hash64(s, len); |
747 | } |
748 | } |
749 | |
750 | uint64_t Hash64WithSeeds(const char *s, size_t len, uint64_t seed0, uint64_t seed1) { |
751 | return farmhashuo::Hash64WithSeeds(s, len, seed0, seed1); |
752 | } |
753 | |
754 | uint64_t Hash64WithSeed(const char *s, size_t len, uint64_t seed) { |
755 | return farmhashuo::Hash64WithSeed(s, len, seed); |
756 | } |
757 | } // namespace farmhashxo |
758 | namespace farmhashte { |
759 | #if !can_use_sse41 || !x86_64 |
760 | |
761 | uint64_t Hash64(const char *s, size_t len) { |
762 | FARMHASH_DIE_IF_MISCONFIGURED; |
763 | return s == NULL ? 0 : len; |
764 | } |
765 | |
766 | uint64_t Hash64WithSeed(const char *s, size_t len, uint64_t seed) { |
767 | FARMHASH_DIE_IF_MISCONFIGURED; |
768 | return seed + Hash64(s, len); |
769 | } |
770 | |
771 | uint64_t Hash64WithSeeds(const char *s, size_t len, |
772 | uint64_t seed0, uint64_t seed1) { |
773 | FARMHASH_DIE_IF_MISCONFIGURED; |
774 | return seed0 + seed1 + Hash64(s, len); |
775 | } |
776 | |
777 | #else |
778 | |
779 | #undef Fetch |
780 | #define Fetch Fetch64 |
781 | |
782 | #undef Rotate |
783 | #define Rotate Rotate64 |
784 | |
785 | #undef Bswap |
786 | #define Bswap Bswap64 |
787 | |
788 | // Helpers for data-parallel operations (1x 128 bits or 2x 64 or 4x 32). |
789 | STATIC_INLINE __m128i Add(__m128i x, __m128i y) { return _mm_add_epi64(x, y); } |
790 | STATIC_INLINE __m128i Xor(__m128i x, __m128i y) { return _mm_xor_si128(x, y); } |
791 | STATIC_INLINE __m128i Mul(__m128i x, __m128i y) { return _mm_mullo_epi32(x, y); } |
792 | STATIC_INLINE __m128i Shuf(__m128i x, __m128i y) { return _mm_shuffle_epi8(y, x); } |
793 | |
794 | // Requires n >= 256. Requires SSE4.1. Should be slightly faster if the |
795 | // compiler uses AVX instructions (e.g., use the -mavx flag with GCC). |
796 | STATIC_INLINE uint64_t Hash64Long(const char* s, size_t n, |
797 | uint64_t seed0, uint64_t seed1) { |
798 | const __m128i kShuf = |
799 | _mm_set_epi8(4, 11, 10, 5, 8, 15, 6, 9, 12, 2, 14, 13, 0, 7, 3, 1); |
800 | const __m128i kMult = |
801 | _mm_set_epi8(0xbd, 0xd6, 0x33, 0x39, 0x45, 0x54, 0xfa, 0x03, |
802 | 0x34, 0x3e, 0x33, 0xed, 0xcc, 0x9e, 0x2d, 0x51); |
803 | uint64_t seed2 = (seed0 + 113) * (seed1 + 9); |
804 | uint64_t seed3 = (Rotate(seed0, 23) + 27) * (Rotate(seed1, 30) + 111); |
805 | __m128i d0 = _mm_cvtsi64_si128(seed0); |
806 | __m128i d1 = _mm_cvtsi64_si128(seed1); |
807 | __m128i d2 = Shuf(kShuf, d0); |
808 | __m128i d3 = Shuf(kShuf, d1); |
809 | __m128i d4 = Xor(d0, d1); |
810 | __m128i d5 = Xor(d1, d2); |
811 | __m128i d6 = Xor(d2, d4); |
812 | __m128i d7 = _mm_set1_epi32(seed2 >> 32); |
813 | __m128i d8 = Mul(kMult, d2); |
814 | __m128i d9 = _mm_set1_epi32(seed3 >> 32); |
815 | __m128i d10 = _mm_set1_epi32(seed3); |
816 | __m128i d11 = Add(d2, _mm_set1_epi32(seed2)); |
817 | const char* end = s + (n & ~static_cast<size_t>(255)); |
818 | do { |
819 | __m128i z; |
820 | z = Fetch128(s); |
821 | d0 = Add(d0, z); |
822 | d1 = Shuf(kShuf, d1); |
823 | d2 = Xor(d2, d0); |
824 | d4 = Xor(d4, z); |
825 | d4 = Xor(d4, d1); |
826 | std::swap(d0, d6); |
827 | z = Fetch128(s + 16); |
828 | d5 = Add(d5, z); |
829 | d6 = Shuf(kShuf, d6); |
830 | d8 = Shuf(kShuf, d8); |
831 | d7 = Xor(d7, d5); |
832 | d0 = Xor(d0, z); |
833 | d0 = Xor(d0, d6); |
834 | std::swap(d5, d11); |
835 | z = Fetch128(s + 32); |
836 | d1 = Add(d1, z); |
837 | d2 = Shuf(kShuf, d2); |
838 | d4 = Shuf(kShuf, d4); |
839 | d5 = Xor(d5, z); |
840 | d5 = Xor(d5, d2); |
841 | std::swap(d10, d4); |
842 | z = Fetch128(s + 48); |
843 | d6 = Add(d6, z); |
844 | d7 = Shuf(kShuf, d7); |
845 | d0 = Shuf(kShuf, d0); |
846 | d8 = Xor(d8, d6); |
847 | d1 = Xor(d1, z); |
848 | d1 = Add(d1, d7); |
849 | z = Fetch128(s + 64); |
850 | d2 = Add(d2, z); |
851 | d5 = Shuf(kShuf, d5); |
852 | d4 = Add(d4, d2); |
853 | d6 = Xor(d6, z); |
854 | d6 = Xor(d6, d11); |
855 | std::swap(d8, d2); |
856 | z = Fetch128(s + 80); |
857 | d7 = Xor(d7, z); |
858 | d8 = Shuf(kShuf, d8); |
859 | d1 = Shuf(kShuf, d1); |
860 | d0 = Add(d0, d7); |
861 | d2 = Add(d2, z); |
862 | d2 = Add(d2, d8); |
863 | std::swap(d1, d7); |
864 | z = Fetch128(s + 96); |
865 | d4 = Shuf(kShuf, d4); |
866 | d6 = Shuf(kShuf, d6); |
867 | d8 = Mul(kMult, d8); |
868 | d5 = Xor(d5, d11); |
869 | d7 = Xor(d7, z); |
870 | d7 = Add(d7, d4); |
871 | std::swap(d6, d0); |
872 | z = Fetch128(s + 112); |
873 | d8 = Add(d8, z); |
874 | d0 = Shuf(kShuf, d0); |
875 | d2 = Shuf(kShuf, d2); |
876 | d1 = Xor(d1, d8); |
877 | d10 = Xor(d10, z); |
878 | d10 = Xor(d10, d0); |
879 | std::swap(d11, d5); |
880 | z = Fetch128(s + 128); |
881 | d4 = Add(d4, z); |
882 | d5 = Shuf(kShuf, d5); |
883 | d7 = Shuf(kShuf, d7); |
884 | d6 = Add(d6, d4); |
885 | d8 = Xor(d8, z); |
886 | d8 = Xor(d8, d5); |
887 | std::swap(d4, d10); |
888 | z = Fetch128(s + 144); |
889 | d0 = Add(d0, z); |
890 | d1 = Shuf(kShuf, d1); |
891 | d2 = Add(d2, d0); |
892 | d4 = Xor(d4, z); |
893 | d4 = Xor(d4, d1); |
894 | z = Fetch128(s + 160); |
895 | d5 = Add(d5, z); |
896 | d6 = Shuf(kShuf, d6); |
897 | d8 = Shuf(kShuf, d8); |
898 | d7 = Xor(d7, d5); |
899 | d0 = Xor(d0, z); |
900 | d0 = Xor(d0, d6); |
901 | std::swap(d2, d8); |
902 | z = Fetch128(s + 176); |
903 | d1 = Add(d1, z); |
904 | d2 = Shuf(kShuf, d2); |
905 | d4 = Shuf(kShuf, d4); |
906 | d5 = Mul(kMult, d5); |
907 | d5 = Xor(d5, z); |
908 | d5 = Xor(d5, d2); |
909 | std::swap(d7, d1); |
910 | z = Fetch128(s + 192); |
911 | d6 = Add(d6, z); |
912 | d7 = Shuf(kShuf, d7); |
913 | d0 = Shuf(kShuf, d0); |
914 | d8 = Add(d8, d6); |
915 | d1 = Xor(d1, z); |
916 | d1 = Xor(d1, d7); |
917 | std::swap(d0, d6); |
918 | z = Fetch128(s + 208); |
919 | d2 = Add(d2, z); |
920 | d5 = Shuf(kShuf, d5); |
921 | d4 = Xor(d4, d2); |
922 | d6 = Xor(d6, z); |
923 | d6 = Xor(d6, d9); |
924 | std::swap(d5, d11); |
925 | z = Fetch128(s + 224); |
926 | d7 = Add(d7, z); |
927 | d8 = Shuf(kShuf, d8); |
928 | d1 = Shuf(kShuf, d1); |
929 | d0 = Xor(d0, d7); |
930 | d2 = Xor(d2, z); |
931 | d2 = Xor(d2, d8); |
932 | std::swap(d10, d4); |
933 | z = Fetch128(s + 240); |
934 | d3 = Add(d3, z); |
935 | d4 = Shuf(kShuf, d4); |
936 | d6 = Shuf(kShuf, d6); |
937 | d7 = Mul(kMult, d7); |
938 | d5 = Add(d5, d3); |
939 | d7 = Xor(d7, z); |
940 | d7 = Xor(d7, d4); |
941 | std::swap(d3, d9); |
942 | s += 256; |
943 | } while (s != end); |
944 | d6 = Add(Mul(kMult, d6), _mm_cvtsi64_si128(n)); |
945 | if (n % 256 != 0) { |
946 | d7 = Add(_mm_shuffle_epi32(d8, (0 << 6) + (3 << 4) + (2 << 2) + (1 << 0)), d7); |
947 | d8 = Add(Mul(kMult, d8), _mm_cvtsi64_si128(farmhashxo::Hash64(s, n % 256))); |
948 | } |
949 | __m128i t[8]; |
950 | d0 = Mul(kMult, Shuf(kShuf, Mul(kMult, d0))); |
951 | d3 = Mul(kMult, Shuf(kShuf, Mul(kMult, d3))); |
952 | d9 = Mul(kMult, Shuf(kShuf, Mul(kMult, d9))); |
953 | d1 = Mul(kMult, Shuf(kShuf, Mul(kMult, d1))); |
954 | d0 = Add(d11, d0); |
955 | d3 = Xor(d7, d3); |
956 | d9 = Add(d8, d9); |
957 | d1 = Add(d10, d1); |
958 | d4 = Add(d3, d4); |
959 | d5 = Add(d9, d5); |
960 | d6 = Xor(d1, d6); |
961 | d2 = Add(d0, d2); |
962 | t[0] = d0; |
963 | t[1] = d3; |
964 | t[2] = d9; |
965 | t[3] = d1; |
966 | t[4] = d4; |
967 | t[5] = d5; |
968 | t[6] = d6; |
969 | t[7] = d2; |
970 | return farmhashxo::Hash64(reinterpret_cast<const char*>(t), sizeof(t)); |
971 | } |
972 | |
973 | uint64_t Hash64(const char *s, size_t len) { |
974 | // Empirically, farmhashxo seems faster until length 512. |
975 | return len >= 512 ? Hash64Long(s, len, k2, k1) : farmhashxo::Hash64(s, len); |
976 | } |
977 | |
978 | uint64_t Hash64WithSeed(const char *s, size_t len, uint64_t seed) { |
979 | return len >= 512 ? Hash64Long(s, len, k1, seed) : |
980 | farmhashxo::Hash64WithSeed(s, len, seed); |
981 | } |
982 | |
983 | uint64_t Hash64WithSeeds(const char *s, size_t len, uint64_t seed0, uint64_t seed1) { |
984 | return len >= 512 ? Hash64Long(s, len, seed0, seed1) : |
985 | farmhashxo::Hash64WithSeeds(s, len, seed0, seed1); |
986 | } |
987 | |
988 | #endif |
989 | } // namespace farmhashte |
990 | namespace farmhashnt { |
991 | #if !can_use_sse41 || !x86_64 |
992 | |
993 | uint32_t Hash32(const char *s, size_t len) { |
994 | FARMHASH_DIE_IF_MISCONFIGURED; |
995 | return s == NULL ? 0 : len; |
996 | } |
997 | |
998 | uint32_t Hash32WithSeed(const char *s, size_t len, uint32_t seed) { |
999 | FARMHASH_DIE_IF_MISCONFIGURED; |
1000 | return seed + Hash32(s, len); |
1001 | } |
1002 | |
1003 | #else |
1004 | |
1005 | uint32_t Hash32(const char *s, size_t len) { |
1006 | return static_cast<uint32_t>(farmhashte::Hash64(s, len)); |
1007 | } |
1008 | |
1009 | uint32_t Hash32WithSeed(const char *s, size_t len, uint32_t seed) { |
1010 | return static_cast<uint32_t>(farmhashte::Hash64WithSeed(s, len, seed)); |
1011 | } |
1012 | |
1013 | #endif |
1014 | } // namespace farmhashnt |
1015 | namespace farmhashmk { |
1016 | #undef Fetch |
1017 | #define Fetch Fetch32 |
1018 | |
1019 | #undef Rotate |
1020 | #define Rotate Rotate32 |
1021 | |
1022 | #undef Bswap |
1023 | #define Bswap Bswap32 |
1024 | |
1025 | STATIC_INLINE uint32_t Hash32Len13to24(const char *s, size_t len, uint32_t seed = 0) { |
1026 | uint32_t a = Fetch(s - 4 + (len >> 1)); |
1027 | uint32_t b = Fetch(s + 4); |
1028 | uint32_t c = Fetch(s + len - 8); |
1029 | uint32_t d = Fetch(s + (len >> 1)); |
1030 | uint32_t e = Fetch(s); |
1031 | uint32_t f = Fetch(s + len - 4); |
1032 | uint32_t h = d * c1 + len + seed; |
1033 | a = Rotate(a, 12) + f; |
1034 | h = Mur(c, h) + a; |
1035 | a = Rotate(a, 3) + c; |
1036 | h = Mur(e, h) + a; |
1037 | a = Rotate(a + f, 12) + d; |
1038 | h = Mur(b ^ seed, h) + a; |
1039 | return fmix(h); |
1040 | } |
1041 | |
1042 | STATIC_INLINE uint32_t Hash32Len0to4(const char *s, size_t len, uint32_t seed = 0) { |
1043 | uint32_t b = seed; |
1044 | uint32_t c = 9; |
1045 | for (size_t i = 0; i < len; i++) { |
1046 | signed char v = s[i]; |
1047 | b = b * c1 + v; |
1048 | c ^= b; |
1049 | } |
1050 | return fmix(Mur(b, Mur(len, c))); |
1051 | } |
1052 | |
1053 | STATIC_INLINE uint32_t Hash32Len5to12(const char *s, size_t len, uint32_t seed = 0) { |
1054 | uint32_t a = len, b = len * 5, c = 9, d = b + seed; |
1055 | a += Fetch(s); |
1056 | b += Fetch(s + len - 4); |
1057 | c += Fetch(s + ((len >> 1) & 4)); |
1058 | return fmix(seed ^ Mur(c, Mur(b, Mur(a, d)))); |
1059 | } |
1060 | |
1061 | uint32_t Hash32(const char *s, size_t len) { |
1062 | if (len <= 24) { |
1063 | return len <= 12 ? |
1064 | (len <= 4 ? Hash32Len0to4(s, len) : Hash32Len5to12(s, len)) : |
1065 | Hash32Len13to24(s, len); |
1066 | } |
1067 | |
1068 | // len > 24 |
1069 | uint32_t h = len, g = c1 * len, f = g; |
1070 | uint32_t a0 = Rotate(Fetch(s + len - 4) * c1, 17) * c2; |
1071 | uint32_t a1 = Rotate(Fetch(s + len - 8) * c1, 17) * c2; |
1072 | uint32_t a2 = Rotate(Fetch(s + len - 16) * c1, 17) * c2; |
1073 | uint32_t a3 = Rotate(Fetch(s + len - 12) * c1, 17) * c2; |
1074 | uint32_t a4 = Rotate(Fetch(s + len - 20) * c1, 17) * c2; |
1075 | h ^= a0; |
1076 | h = Rotate(h, 19); |
1077 | h = h * 5 + 0xe6546b64; |
1078 | h ^= a2; |
1079 | h = Rotate(h, 19); |
1080 | h = h * 5 + 0xe6546b64; |
1081 | g ^= a1; |
1082 | g = Rotate(g, 19); |
1083 | g = g * 5 + 0xe6546b64; |
1084 | g ^= a3; |
1085 | g = Rotate(g, 19); |
1086 | g = g * 5 + 0xe6546b64; |
1087 | f += a4; |
1088 | f = Rotate(f, 19) + 113; |
1089 | size_t iters = (len - 1) / 20; |
1090 | do { |
1091 | uint32_t a = Fetch(s); |
1092 | uint32_t b = Fetch(s + 4); |
1093 | uint32_t c = Fetch(s + 8); |
1094 | uint32_t d = Fetch(s + 12); |
1095 | uint32_t e = Fetch(s + 16); |
1096 | h += a; |
1097 | g += b; |
1098 | f += c; |
1099 | h = Mur(d, h) + e; |
1100 | g = Mur(c, g) + a; |
1101 | f = Mur(b + e * c1, f) + d; |
1102 | f += g; |
1103 | g += f; |
1104 | s += 20; |
1105 | } while (--iters != 0); |
1106 | g = Rotate(g, 11) * c1; |
1107 | g = Rotate(g, 17) * c1; |
1108 | f = Rotate(f, 11) * c1; |
1109 | f = Rotate(f, 17) * c1; |
1110 | h = Rotate(h + g, 19); |
1111 | h = h * 5 + 0xe6546b64; |
1112 | h = Rotate(h, 17) * c1; |
1113 | h = Rotate(h + f, 19); |
1114 | h = h * 5 + 0xe6546b64; |
1115 | h = Rotate(h, 17) * c1; |
1116 | return h; |
1117 | } |
1118 | |
1119 | uint32_t Hash32WithSeed(const char *s, size_t len, uint32_t seed) { |
1120 | if (len <= 24) { |
1121 | if (len >= 13) return Hash32Len13to24(s, len, seed * c1); |
1122 | else if (len >= 5) return Hash32Len5to12(s, len, seed); |
1123 | else return Hash32Len0to4(s, len, seed); |
1124 | } |
1125 | uint32_t h = Hash32Len13to24(s, 24, seed ^ len); |
1126 | return Mur(Hash32(s + 24, len - 24) + seed, h); |
1127 | } |
1128 | } // namespace farmhashmk |
1129 | namespace farmhashsu { |
1130 | #if !can_use_sse42 || !can_use_aesni |
1131 | |
1132 | uint32_t Hash32(const char *s, size_t len) { |
1133 | FARMHASH_DIE_IF_MISCONFIGURED; |
1134 | return s == NULL ? 0 : len; |
1135 | } |
1136 | |
1137 | uint32_t Hash32WithSeed(const char *s, size_t len, uint32_t seed) { |
1138 | FARMHASH_DIE_IF_MISCONFIGURED; |
1139 | return seed + Hash32(s, len); |
1140 | } |
1141 | |
1142 | #else |
1143 | |
1144 | #undef Fetch |
1145 | #define Fetch Fetch32 |
1146 | |
1147 | #undef Rotate |
1148 | #define Rotate Rotate32 |
1149 | |
1150 | #undef Bswap |
1151 | #define Bswap Bswap32 |
1152 | |
1153 | // Helpers for data-parallel operations (4x 32-bits). |
1154 | STATIC_INLINE __m128i Add(__m128i x, __m128i y) { return _mm_add_epi32(x, y); } |
1155 | STATIC_INLINE __m128i Xor(__m128i x, __m128i y) { return _mm_xor_si128(x, y); } |
1156 | STATIC_INLINE __m128i Or(__m128i x, __m128i y) { return _mm_or_si128(x, y); } |
1157 | STATIC_INLINE __m128i Mul(__m128i x, __m128i y) { return _mm_mullo_epi32(x, y); } |
1158 | STATIC_INLINE __m128i Mul5(__m128i x) { return Add(x, _mm_slli_epi32(x, 2)); } |
1159 | STATIC_INLINE __m128i RotateLeft(__m128i x, int c) { |
1160 | return Or(_mm_slli_epi32(x, c), |
1161 | _mm_srli_epi32(x, 32 - c)); |
1162 | } |
1163 | STATIC_INLINE __m128i Rol17(__m128i x) { return RotateLeft(x, 17); } |
1164 | STATIC_INLINE __m128i Rol19(__m128i x) { return RotateLeft(x, 19); } |
1165 | STATIC_INLINE __m128i Shuffle0321(__m128i x) { |
1166 | return _mm_shuffle_epi32(x, (0 << 6) + (3 << 4) + (2 << 2) + (1 << 0)); |
1167 | } |
1168 | |
1169 | uint32_t Hash32(const char *s, size_t len) { |
1170 | const uint32_t seed = 81; |
1171 | if (len <= 24) { |
1172 | return len <= 12 ? |
1173 | (len <= 4 ? |
1174 | farmhashmk::Hash32Len0to4(s, len) : |
1175 | farmhashmk::Hash32Len5to12(s, len)) : |
1176 | farmhashmk::Hash32Len13to24(s, len); |
1177 | } |
1178 | |
1179 | if (len < 40) { |
1180 | uint32_t a = len, b = seed * c2, c = a + b; |
1181 | a += Fetch(s + len - 4); |
1182 | b += Fetch(s + len - 20); |
1183 | c += Fetch(s + len - 16); |
1184 | uint32_t d = a; |
1185 | a = NAMESPACE_FOR_HASH_FUNCTIONS::Rotate32(a, 21); |
1186 | a = Mur(a, Mur(b, _mm_crc32_u32(c, d))); |
1187 | a += Fetch(s + len - 12); |
1188 | b += Fetch(s + len - 8); |
1189 | d += a; |
1190 | a += d; |
1191 | b = Mur(b, d) * c2; |
1192 | a = _mm_crc32_u32(a, b + c); |
1193 | return farmhashmk::Hash32Len13to24(s, (len + 1) / 2, a) + b; |
1194 | } |
1195 | |
1196 | #undef Mulc1 |
1197 | #define Mulc1(x) Mul((x), cc1) |
1198 | |
1199 | #undef Mulc2 |
1200 | #define Mulc2(x) Mul((x), cc2) |
1201 | |
1202 | #undef Murk |
1203 | #define Murk(a, h) \ |
1204 | Add(k, \ |
1205 | Mul5( \ |
1206 | Rol19( \ |
1207 | Xor( \ |
1208 | Mulc2( \ |
1209 | Rol17( \ |
1210 | Mulc1(a))), \ |
1211 | (h))))) |
1212 | |
1213 | const __m128i cc1 = _mm_set1_epi32(c1); |
1214 | const __m128i cc2 = _mm_set1_epi32(c2); |
1215 | __m128i h = _mm_set1_epi32(seed); |
1216 | __m128i g = _mm_set1_epi32(c1 * seed); |
1217 | __m128i f = g; |
1218 | __m128i k = _mm_set1_epi32(0xe6546b64); |
1219 | __m128i q; |
1220 | if (len < 80) { |
1221 | __m128i a = Fetch128(s); |
1222 | __m128i b = Fetch128(s + 16); |
1223 | __m128i c = Fetch128(s + (len - 15) / 2); |
1224 | __m128i d = Fetch128(s + len - 32); |
1225 | __m128i e = Fetch128(s + len - 16); |
1226 | h = Add(h, a); |
1227 | g = Add(g, b); |
1228 | q = g; |
1229 | g = Shuffle0321(g); |
1230 | f = Add(f, c); |
1231 | __m128i be = Add(b, Mulc1(e)); |
1232 | h = Add(h, f); |
1233 | f = Add(f, h); |
1234 | h = Add(Murk(d, h), e); |
1235 | k = Xor(k, _mm_shuffle_epi8(g, f)); |
1236 | g = Add(Xor(c, g), a); |
1237 | f = Add(Xor(be, f), d); |
1238 | k = Add(k, be); |
1239 | k = Add(k, _mm_shuffle_epi8(f, h)); |
1240 | f = Add(f, g); |
1241 | g = Add(g, f); |
1242 | g = Add(_mm_set1_epi32(len), Mulc1(g)); |
1243 | } else { |
1244 | // len >= 80 |
1245 | // The following is loosely modelled after farmhashmk::Hash32. |
1246 | size_t iters = (len - 1) / 80; |
1247 | len -= iters * 80; |
1248 | |
1249 | #undef Chunk |
1250 | #define Chunk() do { \ |
1251 | __m128i a = Fetch128(s); \ |
1252 | __m128i b = Fetch128(s + 16); \ |
1253 | __m128i c = Fetch128(s + 32); \ |
1254 | __m128i d = Fetch128(s + 48); \ |
1255 | __m128i e = Fetch128(s + 64); \ |
1256 | h = Add(h, a); \ |
1257 | g = Add(g, b); \ |
1258 | g = Shuffle0321(g); \ |
1259 | f = Add(f, c); \ |
1260 | __m128i be = Add(b, Mulc1(e)); \ |
1261 | h = Add(h, f); \ |
1262 | f = Add(f, h); \ |
1263 | h = Add(h, d); \ |
1264 | q = Add(q, e); \ |
1265 | h = Rol17(h); \ |
1266 | h = Mulc1(h); \ |
1267 | k = Xor(k, _mm_shuffle_epi8(g, f)); \ |
1268 | g = Add(Xor(c, g), a); \ |
1269 | f = Add(Xor(be, f), d); \ |
1270 | std::swap(f, q); \ |
1271 | q = _mm_aesimc_si128(q); \ |
1272 | k = Add(k, be); \ |
1273 | k = Add(k, _mm_shuffle_epi8(f, h)); \ |
1274 | f = Add(f, g); \ |
1275 | g = Add(g, f); \ |
1276 | f = Mulc1(f); \ |
1277 | } while (0) |
1278 | |
1279 | q = g; |
1280 | while (iters-- != 0) { |
1281 | Chunk(); |
1282 | s += 80; |
1283 | } |
1284 | |
1285 | if (len != 0) { |
1286 | h = Add(h, _mm_set1_epi32(len)); |
1287 | s = s + len - 80; |
1288 | Chunk(); |
1289 | } |
1290 | } |
1291 | |
1292 | g = Shuffle0321(g); |
1293 | k = Xor(k, g); |
1294 | k = Xor(k, q); |
1295 | h = Xor(h, q); |
1296 | f = Mulc1(f); |
1297 | k = Mulc2(k); |
1298 | g = Mulc1(g); |
1299 | h = Mulc2(h); |
1300 | k = Add(k, _mm_shuffle_epi8(g, f)); |
1301 | h = Add(h, f); |
1302 | f = Add(f, h); |
1303 | g = Add(g, k); |
1304 | k = Add(k, g); |
1305 | k = Xor(k, _mm_shuffle_epi8(f, h)); |
1306 | __m128i buf[4]; |
1307 | buf[0] = f; |
1308 | buf[1] = g; |
1309 | buf[2] = k; |
1310 | buf[3] = h; |
1311 | s = reinterpret_cast<char*>(buf); |
1312 | uint32_t x = Fetch(s); |
1313 | uint32_t y = Fetch(s+4); |
1314 | uint32_t z = Fetch(s+8); |
1315 | x = _mm_crc32_u32(x, Fetch(s+12)); |
1316 | y = _mm_crc32_u32(y, Fetch(s+16)); |
1317 | z = _mm_crc32_u32(z * c1, Fetch(s+20)); |
1318 | x = _mm_crc32_u32(x, Fetch(s+24)); |
1319 | y = _mm_crc32_u32(y * c1, Fetch(s+28)); |
1320 | uint32_t o = y; |
1321 | z = _mm_crc32_u32(z, Fetch(s+32)); |
1322 | x = _mm_crc32_u32(x * c1, Fetch(s+36)); |
1323 | y = _mm_crc32_u32(y, Fetch(s+40)); |
1324 | z = _mm_crc32_u32(z * c1, Fetch(s+44)); |
1325 | x = _mm_crc32_u32(x, Fetch(s+48)); |
1326 | y = _mm_crc32_u32(y * c1, Fetch(s+52)); |
1327 | z = _mm_crc32_u32(z, Fetch(s+56)); |
1328 | x = _mm_crc32_u32(x, Fetch(s+60)); |
1329 | return (o - x + y - z) * c1; |
1330 | } |
1331 | |
1332 | #undef Chunk |
1333 | #undef Murk |
1334 | #undef Mulc2 |
1335 | #undef Mulc1 |
1336 | |
1337 | uint32_t Hash32WithSeed(const char *s, size_t len, uint32_t seed) { |
1338 | if (len <= 24) { |
1339 | if (len >= 13) return farmhashmk::Hash32Len13to24(s, len, seed * c1); |
1340 | else if (len >= 5) return farmhashmk::Hash32Len5to12(s, len, seed); |
1341 | else return farmhashmk::Hash32Len0to4(s, len, seed); |
1342 | } |
1343 | uint32_t h = farmhashmk::Hash32Len13to24(s, 24, seed ^ len); |
1344 | return _mm_crc32_u32(Hash32(s + 24, len - 24) + seed, h); |
1345 | } |
1346 | |
1347 | #endif |
1348 | } // namespace farmhashsu |
1349 | namespace farmhashsa { |
1350 | #if !can_use_sse42 |
1351 | |
1352 | uint32_t Hash32(const char *s, size_t len) { |
1353 | FARMHASH_DIE_IF_MISCONFIGURED; |
1354 | return s == NULL ? 0 : len; |
1355 | } |
1356 | |
1357 | uint32_t Hash32WithSeed(const char *s, size_t len, uint32_t seed) { |
1358 | FARMHASH_DIE_IF_MISCONFIGURED; |
1359 | return seed + Hash32(s, len); |
1360 | } |
1361 | |
1362 | #else |
1363 | |
1364 | #undef Fetch |
1365 | #define Fetch Fetch32 |
1366 | |
1367 | #undef Rotate |
1368 | #define Rotate Rotate32 |
1369 | |
1370 | #undef Bswap |
1371 | #define Bswap Bswap32 |
1372 | |
1373 | // Helpers for data-parallel operations (4x 32-bits). |
1374 | STATIC_INLINE __m128i Add(__m128i x, __m128i y) { return _mm_add_epi32(x, y); } |
1375 | STATIC_INLINE __m128i Xor(__m128i x, __m128i y) { return _mm_xor_si128(x, y); } |
1376 | STATIC_INLINE __m128i Or(__m128i x, __m128i y) { return _mm_or_si128(x, y); } |
1377 | STATIC_INLINE __m128i Mul(__m128i x, __m128i y) { return _mm_mullo_epi32(x, y); } |
1378 | STATIC_INLINE __m128i Mul5(__m128i x) { return Add(x, _mm_slli_epi32(x, 2)); } |
1379 | STATIC_INLINE __m128i Rotate(__m128i x, int c) { |
1380 | return Or(_mm_slli_epi32(x, c), |
1381 | _mm_srli_epi32(x, 32 - c)); |
1382 | } |
1383 | STATIC_INLINE __m128i Rot17(__m128i x) { return Rotate(x, 17); } |
1384 | STATIC_INLINE __m128i Rot19(__m128i x) { return Rotate(x, 19); } |
1385 | STATIC_INLINE __m128i Shuffle0321(__m128i x) { |
1386 | return _mm_shuffle_epi32(x, (0 << 6) + (3 << 4) + (2 << 2) + (1 << 0)); |
1387 | } |
1388 | |
1389 | uint32_t Hash32(const char *s, size_t len) { |
1390 | const uint32_t seed = 81; |
1391 | if (len <= 24) { |
1392 | return len <= 12 ? |
1393 | (len <= 4 ? |
1394 | farmhashmk::Hash32Len0to4(s, len) : |
1395 | farmhashmk::Hash32Len5to12(s, len)) : |
1396 | farmhashmk::Hash32Len13to24(s, len); |
1397 | } |
1398 | |
1399 | if (len < 40) { |
1400 | uint32_t a = len, b = seed * c2, c = a + b; |
1401 | a += Fetch(s + len - 4); |
1402 | b += Fetch(s + len - 20); |
1403 | c += Fetch(s + len - 16); |
1404 | uint32_t d = a; |
1405 | a = NAMESPACE_FOR_HASH_FUNCTIONS::Rotate32(a, 21); |
1406 | a = Mur(a, Mur(b, Mur(c, d))); |
1407 | a += Fetch(s + len - 12); |
1408 | b += Fetch(s + len - 8); |
1409 | d += a; |
1410 | a += d; |
1411 | b = Mur(b, d) * c2; |
1412 | a = _mm_crc32_u32(a, b + c); |
1413 | return farmhashmk::Hash32Len13to24(s, (len + 1) / 2, a) + b; |
1414 | } |
1415 | |
1416 | #undef Mulc1 |
1417 | #define Mulc1(x) Mul((x), cc1) |
1418 | |
1419 | #undef Mulc2 |
1420 | #define Mulc2(x) Mul((x), cc2) |
1421 | |
1422 | #undef Murk |
1423 | #define Murk(a, h) \ |
1424 | Add(k, \ |
1425 | Mul5( \ |
1426 | Rot19( \ |
1427 | Xor( \ |
1428 | Mulc2( \ |
1429 | Rot17( \ |
1430 | Mulc1(a))), \ |
1431 | (h))))) |
1432 | |
1433 | const __m128i cc1 = _mm_set1_epi32(c1); |
1434 | const __m128i cc2 = _mm_set1_epi32(c2); |
1435 | __m128i h = _mm_set1_epi32(seed); |
1436 | __m128i g = _mm_set1_epi32(c1 * seed); |
1437 | __m128i f = g; |
1438 | __m128i k = _mm_set1_epi32(0xe6546b64); |
1439 | if (len < 80) { |
1440 | __m128i a = Fetch128(s); |
1441 | __m128i b = Fetch128(s + 16); |
1442 | __m128i c = Fetch128(s + (len - 15) / 2); |
1443 | __m128i d = Fetch128(s + len - 32); |
1444 | __m128i e = Fetch128(s + len - 16); |
1445 | h = Add(h, a); |
1446 | g = Add(g, b); |
1447 | g = Shuffle0321(g); |
1448 | f = Add(f, c); |
1449 | __m128i be = Add(b, Mulc1(e)); |
1450 | h = Add(h, f); |
1451 | f = Add(f, h); |
1452 | h = Add(Murk(d, h), e); |
1453 | k = Xor(k, _mm_shuffle_epi8(g, f)); |
1454 | g = Add(Xor(c, g), a); |
1455 | f = Add(Xor(be, f), d); |
1456 | k = Add(k, be); |
1457 | k = Add(k, _mm_shuffle_epi8(f, h)); |
1458 | f = Add(f, g); |
1459 | g = Add(g, f); |
1460 | g = Add(_mm_set1_epi32(len), Mulc1(g)); |
1461 | } else { |
1462 | // len >= 80 |
1463 | // The following is loosely modelled after farmhashmk::Hash32. |
1464 | size_t iters = (len - 1) / 80; |
1465 | len -= iters * 80; |
1466 | |
1467 | #undef Chunk |
1468 | #define Chunk() do { \ |
1469 | __m128i a = Fetch128(s); \ |
1470 | __m128i b = Fetch128(s + 16); \ |
1471 | __m128i c = Fetch128(s + 32); \ |
1472 | __m128i d = Fetch128(s + 48); \ |
1473 | __m128i e = Fetch128(s + 64); \ |
1474 | h = Add(h, a); \ |
1475 | g = Add(g, b); \ |
1476 | g = Shuffle0321(g); \ |
1477 | f = Add(f, c); \ |
1478 | __m128i be = Add(b, Mulc1(e)); \ |
1479 | h = Add(h, f); \ |
1480 | f = Add(f, h); \ |
1481 | h = Add(Murk(d, h), e); \ |
1482 | k = Xor(k, _mm_shuffle_epi8(g, f)); \ |
1483 | g = Add(Xor(c, g), a); \ |
1484 | f = Add(Xor(be, f), d); \ |
1485 | k = Add(k, be); \ |
1486 | k = Add(k, _mm_shuffle_epi8(f, h)); \ |
1487 | f = Add(f, g); \ |
1488 | g = Add(g, f); \ |
1489 | f = Mulc1(f); \ |
1490 | } while (0) |
1491 | |
1492 | while (iters-- != 0) { |
1493 | Chunk(); |
1494 | s += 80; |
1495 | } |
1496 | |
1497 | if (len != 0) { |
1498 | h = Add(h, _mm_set1_epi32(len)); |
1499 | s = s + len - 80; |
1500 | Chunk(); |
1501 | } |
1502 | } |
1503 | |
1504 | g = Shuffle0321(g); |
1505 | k = Xor(k, g); |
1506 | f = Mulc1(f); |
1507 | k = Mulc2(k); |
1508 | g = Mulc1(g); |
1509 | h = Mulc2(h); |
1510 | k = Add(k, _mm_shuffle_epi8(g, f)); |
1511 | h = Add(h, f); |
1512 | f = Add(f, h); |
1513 | g = Add(g, k); |
1514 | k = Add(k, g); |
1515 | k = Xor(k, _mm_shuffle_epi8(f, h)); |
1516 | __m128i buf[4]; |
1517 | buf[0] = f; |
1518 | buf[1] = g; |
1519 | buf[2] = k; |
1520 | buf[3] = h; |
1521 | s = reinterpret_cast<char*>(buf); |
1522 | uint32_t x = Fetch(s); |
1523 | uint32_t y = Fetch(s+4); |
1524 | uint32_t z = Fetch(s+8); |
1525 | x = _mm_crc32_u32(x, Fetch(s+12)); |
1526 | y = _mm_crc32_u32(y, Fetch(s+16)); |
1527 | z = _mm_crc32_u32(z * c1, Fetch(s+20)); |
1528 | x = _mm_crc32_u32(x, Fetch(s+24)); |
1529 | y = _mm_crc32_u32(y * c1, Fetch(s+28)); |
1530 | uint32_t o = y; |
1531 | z = _mm_crc32_u32(z, Fetch(s+32)); |
1532 | x = _mm_crc32_u32(x * c1, Fetch(s+36)); |
1533 | y = _mm_crc32_u32(y, Fetch(s+40)); |
1534 | z = _mm_crc32_u32(z * c1, Fetch(s+44)); |
1535 | x = _mm_crc32_u32(x, Fetch(s+48)); |
1536 | y = _mm_crc32_u32(y * c1, Fetch(s+52)); |
1537 | z = _mm_crc32_u32(z, Fetch(s+56)); |
1538 | x = _mm_crc32_u32(x, Fetch(s+60)); |
1539 | return (o - x + y - z) * c1; |
1540 | } |
1541 | |
1542 | #undef Chunk |
1543 | #undef Murk |
1544 | #undef Mulc2 |
1545 | #undef Mulc1 |
1546 | |
1547 | uint32_t Hash32WithSeed(const char *s, size_t len, uint32_t seed) { |
1548 | if (len <= 24) { |
1549 | if (len >= 13) return farmhashmk::Hash32Len13to24(s, len, seed * c1); |
1550 | else if (len >= 5) return farmhashmk::Hash32Len5to12(s, len, seed); |
1551 | else return farmhashmk::Hash32Len0to4(s, len, seed); |
1552 | } |
1553 | uint32_t h = farmhashmk::Hash32Len13to24(s, 24, seed ^ len); |
1554 | return _mm_crc32_u32(Hash32(s + 24, len - 24) + seed, h); |
1555 | } |
1556 | |
1557 | #endif |
1558 | } // namespace farmhashsa |
1559 | namespace farmhashcc { |
1560 | // This file provides a 32-bit hash equivalent to CityHash32 (v1.1.1) |
1561 | // and a 128-bit hash equivalent to CityHash128 (v1.1.1). It also provides |
1562 | // a seeded 32-bit hash function similar to CityHash32. |
1563 | |
1564 | #undef Fetch |
1565 | #define Fetch Fetch32 |
1566 | |
1567 | #undef Rotate |
1568 | #define Rotate Rotate32 |
1569 | |
1570 | #undef Bswap |
1571 | #define Bswap Bswap32 |
1572 | |
1573 | STATIC_INLINE uint32_t Hash32Len13to24(const char *s, size_t len) { |
1574 | uint32_t a = Fetch(s - 4 + (len >> 1)); |
1575 | uint32_t b = Fetch(s + 4); |
1576 | uint32_t c = Fetch(s + len - 8); |
1577 | uint32_t d = Fetch(s + (len >> 1)); |
1578 | uint32_t e = Fetch(s); |
1579 | uint32_t f = Fetch(s + len - 4); |
1580 | uint32_t h = len; |
1581 | |
1582 | return fmix(Mur(f, Mur(e, Mur(d, Mur(c, Mur(b, Mur(a, h))))))); |
1583 | } |
1584 | |
1585 | STATIC_INLINE uint32_t Hash32Len0to4(const char *s, size_t len) { |
1586 | uint32_t b = 0; |
1587 | uint32_t c = 9; |
1588 | for (size_t i = 0; i < len; i++) { |
1589 | signed char v = s[i]; |
1590 | b = b * c1 + v; |
1591 | c ^= b; |
1592 | } |
1593 | return fmix(Mur(b, Mur(len, c))); |
1594 | } |
1595 | |
1596 | STATIC_INLINE uint32_t Hash32Len5to12(const char *s, size_t len) { |
1597 | uint32_t a = len, b = len * 5, c = 9, d = b; |
1598 | a += Fetch(s); |
1599 | b += Fetch(s + len - 4); |
1600 | c += Fetch(s + ((len >> 1) & 4)); |
1601 | return fmix(Mur(c, Mur(b, Mur(a, d)))); |
1602 | } |
1603 | |
1604 | uint32_t Hash32(const char *s, size_t len) { |
1605 | if (len <= 24) { |
1606 | return len <= 12 ? |
1607 | (len <= 4 ? Hash32Len0to4(s, len) : Hash32Len5to12(s, len)) : |
1608 | Hash32Len13to24(s, len); |
1609 | } |
1610 | |
1611 | // len > 24 |
1612 | uint32_t h = len, g = c1 * len, f = g; |
1613 | uint32_t a0 = Rotate(Fetch(s + len - 4) * c1, 17) * c2; |
1614 | uint32_t a1 = Rotate(Fetch(s + len - 8) * c1, 17) * c2; |
1615 | uint32_t a2 = Rotate(Fetch(s + len - 16) * c1, 17) * c2; |
1616 | uint32_t a3 = Rotate(Fetch(s + len - 12) * c1, 17) * c2; |
1617 | uint32_t a4 = Rotate(Fetch(s + len - 20) * c1, 17) * c2; |
1618 | h ^= a0; |
1619 | h = Rotate(h, 19); |
1620 | h = h * 5 + 0xe6546b64; |
1621 | h ^= a2; |
1622 | h = Rotate(h, 19); |
1623 | h = h * 5 + 0xe6546b64; |
1624 | g ^= a1; |
1625 | g = Rotate(g, 19); |
1626 | g = g * 5 + 0xe6546b64; |
1627 | g ^= a3; |
1628 | g = Rotate(g, 19); |
1629 | g = g * 5 + 0xe6546b64; |
1630 | f += a4; |
1631 | f = Rotate(f, 19); |
1632 | f = f * 5 + 0xe6546b64; |
1633 | size_t iters = (len - 1) / 20; |
1634 | do { |
1635 | uint32_t a0 = Rotate(Fetch(s) * c1, 17) * c2; |
1636 | uint32_t a1 = Fetch(s + 4); |
1637 | uint32_t a2 = Rotate(Fetch(s + 8) * c1, 17) * c2; |
1638 | uint32_t a3 = Rotate(Fetch(s + 12) * c1, 17) * c2; |
1639 | uint32_t a4 = Fetch(s + 16); |
1640 | h ^= a0; |
1641 | h = Rotate(h, 18); |
1642 | h = h * 5 + 0xe6546b64; |
1643 | f += a1; |
1644 | f = Rotate(f, 19); |
1645 | f = f * c1; |
1646 | g += a2; |
1647 | g = Rotate(g, 18); |
1648 | g = g * 5 + 0xe6546b64; |
1649 | h ^= a3 + a1; |
1650 | h = Rotate(h, 19); |
1651 | h = h * 5 + 0xe6546b64; |
1652 | g ^= a4; |
1653 | g = Bswap(g) * 5; |
1654 | h += a4 * 5; |
1655 | h = Bswap(h); |
1656 | f += a0; |
1657 | PERMUTE3(f, h, g); |
1658 | s += 20; |
1659 | } while (--iters != 0); |
1660 | g = Rotate(g, 11) * c1; |
1661 | g = Rotate(g, 17) * c1; |
1662 | f = Rotate(f, 11) * c1; |
1663 | f = Rotate(f, 17) * c1; |
1664 | h = Rotate(h + g, 19); |
1665 | h = h * 5 + 0xe6546b64; |
1666 | h = Rotate(h, 17) * c1; |
1667 | h = Rotate(h + f, 19); |
1668 | h = h * 5 + 0xe6546b64; |
1669 | h = Rotate(h, 17) * c1; |
1670 | return h; |
1671 | } |
1672 | |
1673 | uint32_t Hash32WithSeed(const char *s, size_t len, uint32_t seed) { |
1674 | if (len <= 24) { |
1675 | if (len >= 13) return farmhashmk::Hash32Len13to24(s, len, seed * c1); |
1676 | else if (len >= 5) return farmhashmk::Hash32Len5to12(s, len, seed); |
1677 | else return farmhashmk::Hash32Len0to4(s, len, seed); |
1678 | } |
1679 | uint32_t h = farmhashmk::Hash32Len13to24(s, 24, seed ^ len); |
1680 | return Mur(Hash32(s + 24, len - 24) + seed, h); |
1681 | } |
1682 | |
1683 | #undef Fetch |
1684 | #define Fetch Fetch64 |
1685 | |
1686 | #undef Rotate |
1687 | #define Rotate Rotate64 |
1688 | |
1689 | #undef Bswap |
1690 | #define Bswap Bswap64 |
1691 | |
1692 | STATIC_INLINE uint64_t ShiftMix(uint64_t val) { |
1693 | return val ^ (val >> 47); |
1694 | } |
1695 | |
1696 | STATIC_INLINE uint64_t HashLen16(uint64_t u, uint64_t v) { |
1697 | return Hash128to64(Uint128(u, v)); |
1698 | } |
1699 | |
1700 | STATIC_INLINE uint64_t HashLen16(uint64_t u, uint64_t v, uint64_t mul) { |
1701 | // Murmur-inspired hashing. |
1702 | uint64_t a = (u ^ v) * mul; |
1703 | a ^= (a >> 47); |
1704 | uint64_t b = (v ^ a) * mul; |
1705 | b ^= (b >> 47); |
1706 | b *= mul; |
1707 | return b; |
1708 | } |
1709 | |
1710 | STATIC_INLINE uint64_t HashLen0to16(const char *s, size_t len) { |
1711 | if (len >= 8) { |
1712 | uint64_t mul = k2 + len * 2; |
1713 | uint64_t a = Fetch(s) + k2; |
1714 | uint64_t b = Fetch(s + len - 8); |
1715 | uint64_t c = Rotate(b, 37) * mul + a; |
1716 | uint64_t d = (Rotate(a, 25) + b) * mul; |
1717 | return HashLen16(c, d, mul); |
1718 | } |
1719 | if (len >= 4) { |
1720 | uint64_t mul = k2 + len * 2; |
1721 | uint64_t a = Fetch32(s); |
1722 | return HashLen16(len + (a << 3), Fetch32(s + len - 4), mul); |
1723 | } |
1724 | if (len > 0) { |
1725 | uint8_t a = s[0]; |
1726 | uint8_t b = s[len >> 1]; |
1727 | uint8_t c = s[len - 1]; |
1728 | uint32_t y = static_cast<uint32_t>(a) + (static_cast<uint32_t>(b) << 8); |
1729 | uint32_t z = len + (static_cast<uint32_t>(c) << 2); |
1730 | return ShiftMix(y * k2 ^ z * k0) * k2; |
1731 | } |
1732 | return k2; |
1733 | } |
1734 | |
1735 | // Return a 16-byte hash for 48 bytes. Quick and dirty. |
1736 | // Callers do best to use "random-looking" values for a and b. |
1737 | STATIC_INLINE pair<uint64_t, uint64_t> WeakHashLen32WithSeeds( |
1738 | uint64_t w, uint64_t x, uint64_t y, uint64_t z, uint64_t a, uint64_t b) { |
1739 | a += w; |
1740 | b = Rotate(b + a + z, 21); |
1741 | uint64_t c = a; |
1742 | a += x; |
1743 | a += y; |
1744 | b += Rotate(a, 44); |
1745 | return make_pair(a + z, b + c); |
1746 | } |
1747 | |
1748 | // Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty. |
1749 | STATIC_INLINE pair<uint64_t, uint64_t> WeakHashLen32WithSeeds( |
1750 | const char* s, uint64_t a, uint64_t b) { |
1751 | return WeakHashLen32WithSeeds(Fetch(s), |
1752 | Fetch(s + 8), |
1753 | Fetch(s + 16), |
1754 | Fetch(s + 24), |
1755 | a, |
1756 | b); |
1757 | } |
1758 | |
1759 | |
1760 | |
1761 | // A subroutine for CityHash128(). Returns a decent 128-bit hash for strings |
1762 | // of any length representable in signed long. Based on City and Murmur. |
1763 | STATIC_INLINE uint128_t CityMurmur(const char *s, size_t len, uint128_t seed) { |
1764 | uint64_t a = Uint128Low64(seed); |
1765 | uint64_t b = Uint128High64(seed); |
1766 | uint64_t c = 0; |
1767 | uint64_t d = 0; |
1768 | signed long l = len - 16; |
1769 | if (l <= 0) { // len <= 16 |
1770 | a = ShiftMix(a * k1) * k1; |
1771 | c = b * k1 + HashLen0to16(s, len); |
1772 | d = ShiftMix(a + (len >= 8 ? Fetch(s) : c)); |
1773 | } else { // len > 16 |
1774 | c = HashLen16(Fetch(s + len - 8) + k1, a); |
1775 | d = HashLen16(b + len, c + Fetch(s + len - 16)); |
1776 | a += d; |
1777 | do { |
1778 | a ^= ShiftMix(Fetch(s) * k1) * k1; |
1779 | a *= k1; |
1780 | b ^= a; |
1781 | c ^= ShiftMix(Fetch(s + 8) * k1) * k1; |
1782 | c *= k1; |
1783 | d ^= c; |
1784 | s += 16; |
1785 | l -= 16; |
1786 | } while (l > 0); |
1787 | } |
1788 | a = HashLen16(a, c); |
1789 | b = HashLen16(d, b); |
1790 | return uint128_t(a ^ b, HashLen16(b, a)); |
1791 | } |
1792 | |
1793 | uint128_t CityHash128WithSeed(const char *s, size_t len, uint128_t seed) { |
1794 | if (len < 128) { |
1795 | return CityMurmur(s, len, seed); |
1796 | } |
1797 | |
1798 | // We expect len >= 128 to be the common case. Keep 56 bytes of state: |
1799 | // v, w, x, y, and z. |
1800 | pair<uint64_t, uint64_t> v, w; |
1801 | uint64_t x = Uint128Low64(seed); |
1802 | uint64_t y = Uint128High64(seed); |
1803 | uint64_t z = len * k1; |
1804 | v.first = Rotate(y ^ k1, 49) * k1 + Fetch(s); |
1805 | v.second = Rotate(v.first, 42) * k1 + Fetch(s + 8); |
1806 | w.first = Rotate(y + z, 35) * k1 + x; |
1807 | w.second = Rotate(x + Fetch(s + 88), 53) * k1; |
1808 | |
1809 | // This is the same inner loop as CityHash64(), manually unrolled. |
1810 | do { |
1811 | x = Rotate(x + y + v.first + Fetch(s + 8), 37) * k1; |
1812 | y = Rotate(y + v.second + Fetch(s + 48), 42) * k1; |
1813 | x ^= w.second; |
1814 | y += v.first + Fetch(s + 40); |
1815 | z = Rotate(z + w.first, 33) * k1; |
1816 | v = WeakHashLen32WithSeeds(s, v.second * k1, x + w.first); |
1817 | w = WeakHashLen32WithSeeds(s + 32, z + w.second, y + Fetch(s + 16)); |
1818 | std::swap(z, x); |
1819 | s += 64; |
1820 | x = Rotate(x + y + v.first + Fetch(s + 8), 37) * k1; |
1821 | y = Rotate(y + v.second + Fetch(s + 48), 42) * k1; |
1822 | x ^= w.second; |
1823 | y += v.first + Fetch(s + 40); |
1824 | z = Rotate(z + w.first, 33) * k1; |
1825 | v = WeakHashLen32WithSeeds(s, v.second * k1, x + w.first); |
1826 | w = WeakHashLen32WithSeeds(s + 32, z + w.second, y + Fetch(s + 16)); |
1827 | std::swap(z, x); |
1828 | s += 64; |
1829 | len -= 128; |
1830 | } while (LIKELY(len >= 128)); |
1831 | x += Rotate(v.first + z, 49) * k0; |
1832 | y = y * k0 + Rotate(w.second, 37); |
1833 | z = z * k0 + Rotate(w.first, 27); |
1834 | w.first *= 9; |
1835 | v.first *= k0; |
1836 | // If 0 < len < 128, hash up to 4 chunks of 32 bytes each from the end of s. |
1837 | for (size_t tail_done = 0; tail_done < len; ) { |
1838 | tail_done += 32; |
1839 | y = Rotate(x + y, 42) * k0 + v.second; |
1840 | w.first += Fetch(s + len - tail_done + 16); |
1841 | x = x * k0 + w.first; |
1842 | z += w.second + Fetch(s + len - tail_done); |
1843 | w.second += v.first; |
1844 | v = WeakHashLen32WithSeeds(s + len - tail_done, v.first + z, v.second); |
1845 | v.first *= k0; |
1846 | } |
1847 | // At this point our 56 bytes of state should contain more than |
1848 | // enough information for a strong 128-bit hash. We use two |
1849 | // different 56-byte-to-8-byte hashes to get a 16-byte final result. |
1850 | x = HashLen16(x, v.first); |
1851 | y = HashLen16(y + z, w.first); |
1852 | return uint128_t(HashLen16(x + v.second, w.second) + y, |
1853 | HashLen16(x + w.second, y + v.second)); |
1854 | } |
1855 | |
1856 | STATIC_INLINE uint128_t CityHash128(const char *s, size_t len) { |
1857 | return len >= 16 ? |
1858 | CityHash128WithSeed(s + 16, len - 16, |
1859 | uint128_t(Fetch(s), Fetch(s + 8) + k0)) : |
1860 | CityHash128WithSeed(s, len, uint128_t(k0, k1)); |
1861 | } |
1862 | |
1863 | uint128_t Fingerprint128(const char* s, size_t len) { |
1864 | return CityHash128(s, len); |
1865 | } |
1866 | } // namespace farmhashcc |
1867 | namespace NAMESPACE_FOR_HASH_FUNCTIONS { |
1868 | |
1869 | // BASIC STRING HASHING |
1870 | |
1871 | // Hash function for a byte array. See also Hash(), below. |
1872 | // May change from time to time, may differ on different platforms, may differ |
1873 | // depending on NDEBUG. |
1874 | uint32_t Hash32(const char* s, size_t len) { |
1875 | return DebugTweak( |
1876 | (can_use_sse41 & x86_64) ? farmhashnt::Hash32(s, len) : |
1877 | (can_use_sse42 & can_use_aesni) ? farmhashsu::Hash32(s, len) : |
1878 | can_use_sse42 ? farmhashsa::Hash32(s, len) : |
1879 | farmhashmk::Hash32(s, len)); |
1880 | } |
1881 | |
1882 | // Hash function for a byte array. For convenience, a 32-bit seed is also |
1883 | // hashed into the result. |
1884 | // May change from time to time, may differ on different platforms, may differ |
1885 | // depending on NDEBUG. |
1886 | uint32_t Hash32WithSeed(const char* s, size_t len, uint32_t seed) { |
1887 | return DebugTweak( |
1888 | (can_use_sse41 & x86_64) ? farmhashnt::Hash32WithSeed(s, len, seed) : |
1889 | (can_use_sse42 & can_use_aesni) ? farmhashsu::Hash32WithSeed(s, len, seed) : |
1890 | can_use_sse42 ? farmhashsa::Hash32WithSeed(s, len, seed) : |
1891 | farmhashmk::Hash32WithSeed(s, len, seed)); |
1892 | } |
1893 | |
1894 | // Hash function for a byte array. For convenience, a 64-bit seed is also |
1895 | // hashed into the result. See also Hash(), below. |
1896 | // May change from time to time, may differ on different platforms, may differ |
1897 | // depending on NDEBUG. |
1898 | uint64_t Hash64(const char* s, size_t len) { |
1899 | return DebugTweak( |
1900 | (can_use_sse42 & x86_64) ? |
1901 | farmhashte::Hash64(s, len) : |
1902 | farmhashxo::Hash64(s, len)); |
1903 | } |
1904 | |
1905 | // Hash function for a byte array. |
1906 | // May change from time to time, may differ on different platforms, may differ |
1907 | // depending on NDEBUG. |
1908 | size_t Hash(const char* s, size_t len) { |
1909 | return sizeof(size_t) == 8 ? Hash64(s, len) : Hash32(s, len); |
1910 | } |
1911 | |
1912 | // Hash function for a byte array. For convenience, a 64-bit seed is also |
1913 | // hashed into the result. |
1914 | // May change from time to time, may differ on different platforms, may differ |
1915 | // depending on NDEBUG. |
1916 | uint64_t Hash64WithSeed(const char* s, size_t len, uint64_t seed) { |
1917 | return DebugTweak(farmhashna::Hash64WithSeed(s, len, seed)); |
1918 | } |
1919 | |
1920 | // Hash function for a byte array. For convenience, two seeds are also |
1921 | // hashed into the result. |
1922 | // May change from time to time, may differ on different platforms, may differ |
1923 | // depending on NDEBUG. |
1924 | uint64_t Hash64WithSeeds(const char* s, size_t len, uint64_t seed0, uint64_t seed1) { |
1925 | return DebugTweak(farmhashna::Hash64WithSeeds(s, len, seed0, seed1)); |
1926 | } |
1927 | |
1928 | // Hash function for a byte array. |
1929 | // May change from time to time, may differ on different platforms, may differ |
1930 | // depending on NDEBUG. |
1931 | uint128_t Hash128(const char* s, size_t len) { |
1932 | return DebugTweak(farmhashcc::Fingerprint128(s, len)); |
1933 | } |
1934 | |
1935 | // Hash function for a byte array. For convenience, a 128-bit seed is also |
1936 | // hashed into the result. |
1937 | // May change from time to time, may differ on different platforms, may differ |
1938 | // depending on NDEBUG. |
1939 | uint128_t Hash128WithSeed(const char* s, size_t len, uint128_t seed) { |
1940 | return DebugTweak(farmhashcc::CityHash128WithSeed(s, len, seed)); |
1941 | } |
1942 | |
1943 | // BASIC NON-STRING HASHING |
1944 | |
1945 | // FINGERPRINTING (i.e., good, portable, forever-fixed hash functions) |
1946 | |
1947 | // Fingerprint function for a byte array. Most useful in 32-bit binaries. |
1948 | uint32_t Fingerprint32(const char* s, size_t len) { |
1949 | return farmhashmk::Hash32(s, len); |
1950 | } |
1951 | |
1952 | // Fingerprint function for a byte array. |
1953 | uint64_t Fingerprint64(const char* s, size_t len) { |
1954 | return farmhashna::Hash64(s, len); |
1955 | } |
1956 | |
1957 | // Fingerprint function for a byte array. |
1958 | uint128_t Fingerprint128(const char* s, size_t len) { |
1959 | return farmhashcc::Fingerprint128(s, len); |
1960 | } |
1961 | |
1962 | // Older and still available but perhaps not as fast as the above: |
1963 | // farmhashns::Hash32{,WithSeed}() |
1964 | |
1965 | } // namespace NAMESPACE_FOR_HASH_FUNCTIONS |
1966 | |
1967 | #if FARMHASHSELFTEST |
1968 | |
1969 | #ifndef FARMHASH_SELF_TEST_GUARD |
1970 | #define FARMHASH_SELF_TEST_GUARD |
1971 | #include <cstdio> |
1972 | #include <iostream> |
1973 | #include <string.h> |
1974 | |
1975 | using std::cout; |
1976 | using std::cerr; |
1977 | using std::endl; |
1978 | using std::hex; |
1979 | |
1980 | static const uint64_t kSeed0 = 1234567; |
1981 | static const uint64_t kSeed1 = k0; |
1982 | static const int kDataSize = 1 << 20; |
1983 | static const int kTestSize = 300; |
1984 | #define kSeed128 Uint128(kSeed0, kSeed1) |
1985 | |
1986 | static char data[kDataSize]; |
1987 | |
1988 | static int completed_self_tests = 0; |
1989 | static int errors = 0; |
1990 | |
1991 | // Initialize data to pseudorandom values. |
1992 | void Setup() { |
1993 | if (completed_self_tests == 0) { |
1994 | uint64_t a = 9; |
1995 | uint64_t b = 777; |
1996 | for (int i = 0; i < kDataSize; i++) { |
1997 | a += b; |
1998 | b += a; |
1999 | a = (a ^ (a >> 41)) * k0; |
2000 | b = (b ^ (b >> 41)) * k0 + i; |
2001 | uint8_t u = b >> 37; |
2002 | memcpy(data + i, &u, 1); // uint8_t -> char |
2003 | } |
2004 | } |
2005 | } |
2006 | |
2007 | int NoteErrors() { |
2008 | #define NUM_SELF_TESTS 9 |
2009 | if (++completed_self_tests == NUM_SELF_TESTS) |
2010 | std::exit(errors > 0); |
2011 | return errors; |
2012 | } |
2013 | |
2014 | template <typename T> inline bool IsNonZero(T x) { |
2015 | return x != 0; |
2016 | } |
2017 | |
2018 | template <> inline bool IsNonZero<uint128_t>(uint128_t x) { |
2019 | return x != Uint128(0, 0); |
2020 | } |
2021 | |
2022 | #endif // FARMHASH_SELF_TEST_GUARD |
2023 | |
2024 | namespace farmhashccTest { |
2025 | |
2026 | uint32_t CreateSeed(int offset, int salt) { |
2027 | uint32_t h = static_cast<uint32_t>(salt & 0xffffffff); |
2028 | h = h * c1; |
2029 | h ^= (h >> 17); |
2030 | h = h * c1; |
2031 | h ^= (h >> 17); |
2032 | h = h * c1; |
2033 | h ^= (h >> 17); |
2034 | h += static_cast<uint32_t>(offset & 0xffffffff); |
2035 | h = h * c1; |
2036 | h ^= (h >> 17); |
2037 | h = h * c1; |
2038 | h ^= (h >> 17); |
2039 | h = h * c1; |
2040 | h ^= (h >> 17); |
2041 | return h; |
2042 | } |
2043 | |
2044 | #undef SEED |
2045 | #undef SEED1 |
2046 | #undef SEED0 |
2047 | #define SEED CreateSeed(offset, -1) |
2048 | #define SEED0 CreateSeed(offset, 0) |
2049 | #define SEED1 CreateSeed(offset, 1) |
2050 | |
2051 | #undef TESTING |
2052 | #define TESTING 1 |
2053 | #if TESTING |
2054 | uint32_t expected[] = { |
2055 | 4223616069u, |
2056 | 3696677242u, |
2057 | 1039179260u, 1690343979u, 1018511555u, 2464489001u, |
2058 | 20368522u, 2663783964u, 175201532u, 1619210592u, |
2059 | 4081014168u, |
2060 | 2576519988u, |
2061 | 3285042206u, 502478099u, 739479538u, 1500332790u, |
2062 | 13754768u, 3789353455u, 3473868058u, 1909255088u, |
2063 | 2212771159u, |
2064 | 1112731063u, |
2065 | 826915357u, 2893489933u, 118369799u, 1848668220u, |
2066 | 1308219822u, 249416982u, 64306364u, 4221800195u, |
2067 | 1020067935u, |
2068 | 3955445564u, |
2069 | 563346294u, 550236731u, 2339016688u, 1826259714u, |
2070 | 3872358639u, 2295981050u, 1870005390u, 4015628802u, |
2071 | 1451961420u, |
2072 | 653440099u, |
2073 | 1292493871u, 164377749u, 1717712483u, 463414587u, |
2074 | 3924343675u, 1050492084u, 3566618804u, 2046983362u, |
2075 | 31917516u, |
2076 | 2957164615u, |
2077 | 230718965u, 999595115u, 3534822176u, 2175709186u, |
2078 | 965707431u, 441796222u, 2481718051u, 1827777486u, |
2079 | 2590087362u, |
2080 | 3879448744u, |
2081 | 3515079898u, 1601433082u, 982764532u, 254808716u, |
2082 | 1293372530u, 4205605817u, 947001462u, 1138890052u, |
2083 | 176305566u, |
2084 | 2447367541u, |
2085 | 2973802542u, 4123621138u, 3083865840u, 1706367795u, |
2086 | 792114347u, 2880110657u, 440613768u, 195054868u, |
2087 | 1359016305u, |
2088 | 3363804638u, |
2089 | 649488537u, 1624045597u, 1441938215u, 3147758996u, |
2090 | 3199173578u, 2597283203u, 2191333609u, 3763129144u, |
2091 | 1117290165u, |
2092 | 1062549743u, |
2093 | 2565615889u, 1046361554u, 1581968261u, 1058773671u, |
2094 | 1123053168u, 3807622275u, 1486749916u, 3900816089u, |
2095 | 2437877004u, |
2096 | 1894455839u, |
2097 | 1912520953u, 1914997013u, 561048608u, 1643267444u, |
2098 | 3671572006u, 194811086u, 1468911468u, 2179206286u, |
2099 | 673206794u, |
2100 | 3486923651u, |
2101 | 3741426466u, 3292160512u, 697001377u, 1900763774u, |
2102 | 3726097344u, 629282039u, 3578723715u, 2868028489u, |
2103 | 3269862919u, |
2104 | 2303349487u, |
2105 | 3643953525u, 2307255916u, 849996280u, 732080434u, |
2106 | 909961480u, 3542445214u, 2628347095u, 4236856917u, |
2107 | 1380660650u, |
2108 | 2631821908u, |
2109 | 2007289004u, 3509705198u, 3788541675u, 789457322u, |
2110 | 3090670546u, 638977894u, 3503881773u, 947102987u, |
2111 | 1525325287u, |
2112 | 1816697045u, |
2113 | 2706647405u, 288763142u, 3505438495u, 481308609u, |
2114 | 2882636782u, 3745162621u, 3503467033u, 428247823u, |
2115 | 176408838u, |
2116 | 333551502u, |
2117 | 1001068721u, 1681483651u, 75380831u, 4191469679u, |
2118 | 3627361839u, 2736617386u, 3120737438u, 1297502456u, |
2119 | 864896482u, |
2120 | 85674920u, |
2121 | 2886047255u, 4119881331u, 2496990525u, 3442502055u, |
2122 | 1806582817u, 3186345024u, 4099591287u, 2560171465u, |
2123 | 3489229104u, |
2124 | 3065015872u, |
2125 | 2755089808u, 3098442882u, 378524719u, 2664097023u, |
2126 | 1771960725u, 2901182183u, 55258521u, 1266621443u, |
2127 | 581644891u, |
2128 | 37790450u, |
2129 | 1800731704u, 3601350920u, 53428754u, 2759476837u, |
2130 | 3391093099u, 1496510311u, 2511119507u, 2636877410u, |
2131 | 631613207u, |
2132 | 1573846064u, |
2133 | 260484875u, 1088212603u, 2369525206u, 322522428u, |
2134 | 3191396600u, 2076543340u, 1552496658u, 2739811558u, |
2135 | 3867875546u, |
2136 | 2051584261u, |
2137 | 2126250818u, 901517871u, 3651631165u, 1323139145u, |
2138 | 1521111765u, 477802997u, 3508559783u, 383954241u, |
2139 | 3804516756u, |
2140 | 4250206331u, |
2141 | 2655954340u, 2484996477u, 1417544845u, 1520282298u, |
2142 | 2745204366u, 2869345147u, 1872738335u, 2592877343u, |
2143 | 1619744564u, |
2144 | 1804962124u, |
2145 | 3458679890u, 423948620u, 273645618u, 4187865426u, |
2146 | 376057175u, 2943431463u, 3581950599u, 1035398331u, |
2147 | 1088213445u, |
2148 | 861988903u, |
2149 | 1323370244u, 777069428u, 506235917u, 369720851u, |
2150 | 2789995854u, 230915180u, 1505086948u, 940361236u, |
2151 | 3727873235u, |
2152 | 1159167499u, |
2153 | 1860302871u, 3456858862u, 3923555152u, 2131072714u, |
2154 | 2910461068u, 3671950363u, 2010742682u, 4088068851u, |
2155 | 3616470388u, |
2156 | 2087714788u, |
2157 | 221675509u, 1230154072u, 3450704646u, 1463226695u, |
2158 | 1998357699u, 266026801u, 619568740u, 3560427266u, |
2159 | 4148162586u, |
2160 | 3150417316u, |
2161 | 1356375822u, 2056097622u, 627905802u, 3881675638u, |
2162 | 2309738053u, 971916703u, 3447805361u, 1673575328u, |
2163 | 673084328u, |
2164 | 3317849401u, |
2165 | 2836362782u, 2377208890u, 3275350588u, 158350552u, |
2166 | 2553241779u, 2497264995u, 3262882649u, 3897937187u, |
2167 | 1598963653u, |
2168 | 3068514414u, |
2169 | 601541505u, 374517071u, 3380795976u, 235752573u, |
2170 | 284670003u, 2990192160u, 904937105u, 2306579150u, |
2171 | 2117362589u, |
2172 | 1635274830u, |
2173 | 3355572906u, 170799903u, 1226685528u, 664567688u, |
2174 | 413219134u, 878324258u, 4026159448u, 3620649295u, |
2175 | 1823625377u, |
2176 | 3175888439u, |
2177 | 1759344347u, 2640637095u, 3549558u, 2192984935u, |
2178 | 978623493u, 804017880u, 3877562323u, 3843116489u, |
2179 | 1641748342u, |
2180 | 1853539444u, |
2181 | 3001178468u, 3443560727u, 2685426077u, 1653064722u, |
2182 | 349231508u, 2726789654u, 3136215581u, 768402830u, |
2183 | 269384321u, |
2184 | 531936536u, |
2185 | 2592883487u, 1343156334u, 3628619802u, 1477143570u, |
2186 | 4269458419u, 3285611028u, 959104925u, 2712290710u, |
2187 | 3480237248u, |
2188 | 835796333u, |
2189 | 2020636251u, 1191914589u, 126521603u, 4288023938u, |
2190 | 3731699932u, 2136758855u, 985780142u, 193807575u, |
2191 | 1850544433u, |
2192 | 653947619u, |
2193 | 3929316796u, 381871169u, 950486363u, 1787262279u, |
2194 | 360480382u, 1800636585u, 1039258631u, 3682073259u, |
2195 | 1262819303u, |
2196 | 1786000319u, |
2197 | 1570627191u, 893065837u, 301304916u, 1478469809u, |
2198 | 623018819u, 2742232545u, 2058913014u, 1706060059u, |
2199 | 2421125401u, |
2200 | 1315829592u, |
2201 | 3208766775u, 1805586156u, 575853086u, 3085025513u, |
2202 | 4010908260u, 2344058256u, 3814407434u, 1458485673u, |
2203 | 2474514786u, |
2204 | 3581895658u, |
2205 | 2710719679u, 190812706u, 2135454262u, 2620080728u, |
2206 | 3400757986u, 1669914857u, 1559978393u, 1629811331u, |
2207 | 3096616493u, |
2208 | 1391424435u, |
2209 | 4158376003u, 1015657076u, 794783832u, 479952178u, |
2210 | 1150290207u, 2497437906u, 231815090u, 755078067u, |
2211 | 3832053281u, |
2212 | 63649475u, |
2213 | 2415822606u, 4105027719u, 1706992318u, 1106598740u, |
2214 | 3941945667u, 1271300761u, 505882259u, 760186809u, |
2215 | 2657183368u, |
2216 | 1925422058u, |
2217 | 1039773764u, 880219458u, 4275949176u, 1556833823u, |
2218 | 925882132u, 4216310340u, 757497522u, 461833914u, |
2219 | 3884002070u, |
2220 | 2790957660u, |
2221 | 2100050089u, 651959176u, 1380301291u, 1289124125u, |
2222 | 452314403u, 226156280u, 3306924715u, 1750807758u, |
2223 | 2290180542u, |
2224 | 1953760569u, |
2225 | 2253069096u, 3960924806u, 1786291620u, 60736185u, |
2226 | 2569018293u, 3870479674u, 2247005661u, 2239850953u, |
2227 | 4261808536u, |
2228 | 3282975782u, |
2229 | 780945879u, 3349849383u, 1579362556u, 2265045884u, |
2230 | 905088740u, 725212379u, 3156479246u, 2501620391u, |
2231 | 3062836263u, |
2232 | 4070422690u, |
2233 | 996797869u, 4082582315u, 976105756u, 303983602u, |
2234 | 1862104804u, 3864508254u, 3383979677u, 2835500286u, |
2235 | 2798364010u, |
2236 | 519359476u, |
2237 | 3447342725u, 194373889u, 3313466630u, 232399983u, |
2238 | 2841787856u, 1672751454u, 3345183154u, 1805381384u, |
2239 | 2226129336u, |
2240 | 2847829057u, |
2241 | 2350774567u, 2838540121u, 2757948482u, 1017002062u, |
2242 | 2329150951u, 2171488196u, 3668619047u, 3874977844u, |
2243 | 3287966998u, |
2244 | 262346753u, |
2245 | 2493054715u, 2298644430u, 2926101182u, 1528457638u, |
2246 | 598656233u, 2615845874u, 989110727u, 820441411u, |
2247 | 253617372u, |
2248 | 2201077208u, |
2249 | 2047569338u, 3114356329u, 3335563734u, 2967673540u, |
2250 | 768438341u, 1417708203u, 3873718246u, 1538441843u, |
2251 | 1279167650u, |
2252 | 3917966776u, |
2253 | 2218481734u, 1015935150u, 1957845042u, 1318150213u, |
2254 | 3146423971u, 4218994877u, 1162470863u, 1519718292u, |
2255 | 2594658906u, |
2256 | 665870414u, |
2257 | 3430347817u, 3933868731u, 1597041394u, 3138684682u, |
2258 | 3398212027u, 1064647658u, 1576321132u, 14792918u, |
2259 | 224938029u, |
2260 | 3706456050u, |
2261 | 847274786u, 2645698692u, 1743374687u, 2343133224u, |
2262 | 3066596790u, 2857270120u, 200596308u, 452055528u, |
2263 | 2319312082u, |
2264 | 3488655402u, |
2265 | 4146865894u, 608206438u, 2699777051u, 3687240713u, |
2266 | 327957508u, 3664730153u, 568134564u, 2993484554u, |
2267 | 4159860363u, |
2268 | 4274533921u, |
2269 | 1079994063u, 2360220210u, 3609597760u, 3639708902u, |
2270 | 2836180437u, 1069910270u, 1892427666u, 1874729790u, |
2271 | 1267712826u, |
2272 | 121886940u, |
2273 | 3572289214u, 2475945610u, 783779452u, 588827737u, |
2274 | 1531395014u, 2085084212u, 2219189792u, 3981444548u, |
2275 | 2218885336u, |
2276 | 1691622694u, |
2277 | 2053232885u, 1386558530u, 2182946189u, 2365247285u, |
2278 | 1871081313u, 2935751853u, 38413723u, 543465863u, |
2279 | 900691890u, |
2280 | 2899905665u, |
2281 | 575120562u, 93133904u, 457154948u, 2983705792u, |
2282 | 4232229200u, 2038565963u, 614693984u, 3405328302u, |
2283 | 4083090010u, |
2284 | 2088004171u, |
2285 | 244031209u, 1861889294u, 2417109253u, 3299562328u, |
2286 | 4158642443u, 4199064449u, 3161611046u, 885015950u, |
2287 | 3677904099u, |
2288 | 2969861785u, |
2289 | 772348805u, 1712263832u, 3219357614u, 484271305u, |
2290 | 3645706114u, 2059620251u, 409557488u, 2278896731u, |
2291 | 224475749u, |
2292 | 3523022952u, |
2293 | 2057140088u, 449131785u, 1149879244u, 4255363996u, |
2294 | 3602720135u, 1690010854u, 2503998822u, 2750828466u, |
2295 | 3340671802u, |
2296 | 1447583863u, |
2297 | 2649684943u, 2764747249u, 3046070595u, 3441726138u, |
2298 | 3840332559u, 3156747501u, 1288666680u, 1472744459u, |
2299 | 3452391933u, |
2300 | 1617542784u, |
2301 | 217869690u, 3718469527u, 348639731u, 590532355u, |
2302 | 43789787u, 22606314u, 1621559290u, 2231743261u, |
2303 | 2234620879u, |
2304 | 544748955u, |
2305 | 3169387920u, 203343594u, 3272552527u, 1078282365u, |
2306 | 809576321u, 854207584u, 3625491053u, 1193737267u, |
2307 | 1628966807u, |
2308 | 2661421060u, |
2309 | 2433442061u, 3886639039u, 2149304418u, 303000565u, |
2310 | 1432830882u, 137378235u, 1135974068u, 318705754u, |
2311 | 2491227157u, |
2312 | 2627534472u, |
2313 | 3520352233u, 2488397682u, 3969194920u, 3843962181u, |
2314 | 2135981459u, 2611933220u, 799460731u, 2300968851u, |
2315 | 3412851628u, |
2316 | 3070914013u, |
2317 | 3555224260u, 4125937572u, 240359903u, 722496673u, |
2318 | 2061023600u, 3843919221u, 2759960043u, 1191155322u, |
2319 | 1504041490u, |
2320 | 3735253656u, |
2321 | 1773124736u, 101110011u, 1627699578u, 2645634551u, |
2322 | 263603947u, 1388368439u, 677146538u, 1644201982u, |
2323 | 2625699644u, |
2324 | 2403862553u, |
2325 | 2426069017u, 3613511705u, 915141802u, 2981654265u, |
2326 | 3474818167u, 2611101773u, 627891434u, 762754924u, |
2327 | 2143021902u, |
2328 | 51067670u, |
2329 | 4017746573u, 2269879853u, 3037857950u, 2388899692u, |
2330 | 582729171u, 1886116725u, 2281219772u, 264704948u, |
2331 | 3509984037u, |
2332 | 4078683368u, |
2333 | 2172959411u, 1807195632u, 3357092302u, 2253764928u, |
2334 | 2320369390u, 3076335959u, 2623583210u, 168378015u, |
2335 | 1435562650u, |
2336 | 1100977467u, |
2337 | 3160490319u, 2550328495u, 2396855930u, 1347823908u, |
2338 | 1617990918u, 3849653099u, 3224111576u, 1681539821u, |
2339 | 4171542880u, |
2340 | 552200045u, |
2341 | 3562947778u, 1676237880u, 3747732307u, 2453332913u, |
2342 | 865530667u, 3566636849u, 3485502777u, 336779723u, |
2343 | 2535942410u, |
2344 | 1685000184u, |
2345 | 820545711u, 1893670486u, 1273910461u, 1193758569u, |
2346 | 970365241u, 381205962u, 3612810852u, 1160577445u, |
2347 | 541488143u, |
2348 | 4005031080u, |
2349 | 2333965236u, 2419855455u, 3484533538u, 3073937876u, |
2350 | 908466956u, 661391539u, 2342122412u, 1467049112u, |
2351 | 1785800827u, |
2352 | 135343033u, |
2353 | 139643209u, 2438375667u, 974654058u, 3216478230u, |
2354 | 3807620420u, 779043363u, 2812846449u, 333254784u, |
2355 | 1025244024u, |
2356 | 2242303095u, |
2357 | 2476683742u, 350018683u, 174652916u, 933097576u, |
2358 | 826905896u, 559603581u, 2777181260u, 164915169u, |
2359 | 4070353203u, |
2360 | 1459055748u, |
2361 | 297303985u, 3103837241u, 3812514233u, 232265137u, |
2362 | 2032819099u, 1523091376u, 3531238208u, 1403510182u, |
2363 | 2886832080u, |
2364 | 2599705941u, |
2365 | 2789695716u, 68437968u, 3823813791u, 1040994569u, |
2366 | 3024194990u, 2461740520u, 3735391266u, 2042207153u, |
2367 | 2461678616u, |
2368 | 3519231840u, |
2369 | 1344224923u, 411442756u, 1179779351u, 7661528u, |
2370 | 778352196u, 3288808867u, 589356197u, 2627504511u, |
2371 | 3374744599u, |
2372 | 3312172905u, |
2373 | 357423007u, 3539567796u, 4044452215u, 1445118403u, |
2374 | 2937983820u, 184089910u, 346201845u, 2427295202u, |
2375 | 1345448010u, |
2376 | 2884434843u, |
2377 | 3085001879u, 2640105409u, 315310640u, 3530289798u, |
2378 | 3362974764u, 963602652u, 75228477u, 3509381180u, |
2379 | 4012777756u, |
2380 | 2380345941u, |
2381 | 1073137836u, 2083960378u, 1220315185u, 3628720934u, |
2382 | 3508867818u, 67148343u, 3558085158u, 1753943368u, |
2383 | 863309561u, |
2384 | 2844713625u, |
2385 | 441921850u, 854732254u, 816793316u, 2555428747u, |
2386 | 3440623414u, 1707304366u, 3189874375u, 1623229221u, |
2387 | 1220335976u, |
2388 | 806745430u, |
2389 | 3909262947u, 1680369031u, 2926179486u, 3410391660u, |
2390 | 3991630434u, 2876458763u, 1179167079u, 536360759u, |
2391 | 1592117159u, |
2392 | 1514343977u, |
2393 | 1032622306u, 2057494855u, 784938958u, 178402996u, |
2394 | 1152907972u, 2326185495u, 2939973666u, 4181120253u, |
2395 | 552831733u, |
2396 | 664251856u, |
2397 | 1297139539u, 1969357631u, 1474065957u, 3055419017u, |
2398 | 3395829380u, 3316562752u, 2168409017u, 614624786u, |
2399 | 3585854336u, |
2400 | 668291094u, |
2401 | 1162889217u, 3773171307u, 2263271126u, 355089668u, |
2402 | 3195850578u, 3396793277u, 3519870267u, 527857605u, |
2403 | 3972392320u, |
2404 | 2224315010u, |
2405 | 4047225561u, 3271434798u, 3192704713u, 2798505213u, |
2406 | 3932215896u, 3792924012u, 3796843756u, 453872975u, |
2407 | 4050552799u, |
2408 | 1056432676u, |
2409 | 928166947u, 121311642u, 930989547u, 2087070683u, |
2410 | 1288978057u, 1556325239u, 1812435626u, 1682385724u, |
2411 | 1214364933u, |
2412 | 904760776u, |
2413 | 3957045528u, 3949822847u, 2411065880u, 3716420732u, |
2414 | 3424837835u, 3833550693u, 1799375326u, 2012368921u, |
2415 | 2768764136u, |
2416 | 1786111037u, |
2417 | 4055479315u, 3751639533u, 2808224623u, 3492656387u, |
2418 | 1306824780u, 2624000170u, 3134795218u, 1778409297u, |
2419 | 3900821801u, |
2420 | 593336325u, |
2421 | 2772069220u, 2980873673u, 3574497158u, 3994780459u, |
2422 | 4246519854u, 3482758570u, 4228015183u, 33101083u, |
2423 | 1769887734u, |
2424 | 4158035314u, |
2425 | 3690638998u, 1119035482u, 4134969651u, 2483207353u, |
2426 | 3932823321u, 285829887u, 3485140138u, 1304815138u, |
2427 | 995608264u, |
2428 | 3133997465u, |
2429 | 1195477617u, 2147693728u, 3506673112u, 4234467492u, |
2430 | 1183174337u, 1395340482u, 769199343u, 193262308u, |
2431 | 2798920256u, |
2432 | 3827889422u, |
2433 | 3399695609u, 3036045724u, 2999477386u, 3567001759u, |
2434 | 2682864314u, 1414023907u, 3699872975u, 3369870701u, |
2435 | 2662284872u, |
2436 | 2179640019u, |
2437 | 2485080099u, 3234415609u, 3755915606u, 1339453220u, |
2438 | 1567403399u, 2076272391u, 293946298u, 3861962750u, |
2439 | 1291949822u, |
2440 | 2916864995u, |
2441 | 132642326u, 2215117062u, 2205863575u, 2488805750u, |
2442 | 405632860u, 3248129390u, 2952606864u, 896734759u, |
2443 | 2047417173u, |
2444 | 3865951392u, |
2445 | 657296855u, 1328547532u, 3966511825u, 3959682388u, |
2446 | 4171801020u, 2981416957u, 1868896247u, 790081075u, |
2447 | 3143666398u, |
2448 | 2950766549u, |
2449 | 2065854887u, 2737081890u, 995061774u, 1510712611u, |
2450 | 2865954809u, 565044286u, 1565631102u, 1500654931u, |
2451 | 494822108u, |
2452 | 2803515503u, |
2453 | 1058154996u, 3506280187u, 856885925u, 4204610546u, |
2454 | 800905649u, 1130711562u, 558146282u, 2053400666u, |
2455 | 449794061u, |
2456 | 2643520245u, |
2457 | 2101248725u, 3123292429u, 3583524041u, 983372394u, |
2458 | 1587743780u, 672870813u, 444833475u, 100741452u, |
2459 | 366232251u, |
2460 | 1717951248u, |
2461 | 524144122u, 1362432726u, 1304947719u, 674306020u, |
2462 | 405665887u, 4081931036u, 1580408204u, 2343242778u, |
2463 | 3901654006u, |
2464 | 2627173567u, |
2465 | 3015148205u, 814686701u, 1327920712u, 1346494176u, |
2466 | 2468632605u, 2259795544u, 2519278184u, 2129281928u, |
2467 | 2860266380u, |
2468 | 4001619412u, |
2469 | 1154910973u, 2841022216u, 1199925485u, 1372200293u, |
2470 | 2713179055u, 3609776550u, 2896463880u, 1056406892u, |
2471 | 177413841u, |
2472 | 40180172u, |
2473 | 3274788406u, 660921784u, 1686225028u, 4003382965u, |
2474 | 2532691887u, 4256809101u, 1186018983u, 667359096u, |
2475 | 2375266493u, |
2476 | 2760222015u, |
2477 | 745187078u, 312264012u, 396822261u, 2588536966u, |
2478 | 2026998998u, 1766454365u, 3218807676u, 3915487497u, |
2479 | 2630550356u, |
2480 | 4130063378u, |
2481 | 4231937074u, 752212123u, 3085144349u, 3267186363u, |
2482 | 4103872100u, 4193207863u, 1306401710u, 3014853131u, |
2483 | 1067760598u, |
2484 | 2306188342u, |
2485 | 2437881506u, 4258185052u, 2506507580u, 130876929u, |
2486 | 1076894205u, 4106981702u, 2799540844u, 945747327u, |
2487 | 1436722291u, |
2488 | 2499772225u, |
2489 | 2571537041u, 2038830635u, 2066826058u, 2892892912u, |
2490 | 524875858u, 3392572161u, 2869992096u, 1308273341u, |
2491 | 923668994u, |
2492 | 1980407857u, |
2493 | 2275009652u, 240598096u, 2658376530u, 3505603048u, |
2494 | 1022603789u, 582423424u, 846379327u, 4092636095u, |
2495 | 4177298326u, |
2496 | 1004173023u, |
2497 | 2154027018u, 2993634669u, 1098364089u, 3035642175u, |
2498 | 1335688126u, 1376393415u, 1252369770u, 3815033328u, |
2499 | 1999309358u, |
2500 | 1234054757u, |
2501 | 1388595255u, 2859334775u, 366532860u, 3453410395u, |
2502 | 4226967708u, 1321729870u, 2078463405u, 156766592u, |
2503 | 3157683394u, |
2504 | 3549293384u, |
2505 | 3348214547u, 2879648344u, 1144813399u, 2758966254u, |
2506 | 647753581u, 813615926u, 2035441590u, 1961053117u, |
2507 | 600168686u, |
2508 | 2192833387u, |
2509 | 3156481401u, 3627320321u, 383550248u, 81209584u, |
2510 | 2339331745u, 1284116690u, 1980144976u, 2955724163u, |
2511 | 789301728u, |
2512 | 3842040415u, |
2513 | 1115881490u, 965249078u, 4098663322u, 1870257033u, |
2514 | 2923150701u, 4217108433u, 183816559u, 2104089285u, |
2515 | 2640095343u, |
2516 | 3173757052u, |
2517 | 927847464u, 2383114981u, 4287174363u, 1886129652u, |
2518 | 70635161u, 1182924521u, 1121440038u, 4246220730u, |
2519 | 3890583049u, |
2520 | 975913757u, |
2521 | 2436253031u, 1074894869u, 1301280627u, 992471939u, |
2522 | 735658128u, 244441856u, 1541612456u, 3457776165u, |
2523 | 3503534059u, |
2524 | 1931651133u, |
2525 | 349142786u, 3669028584u, 1828812038u, 99128389u, |
2526 | 1364272849u, 1963678455u, 3971963311u, 2316950886u, |
2527 | 1308901796u, |
2528 | 2789591580u, |
2529 | 1460494965u, 2380227479u, 1577190651u, 1755822080u, |
2530 | 2911014607u, 859387544u, 13023113u, 2319243370u, |
2531 | 2522582211u, |
2532 | 2299110490u, |
2533 | 3342378874u, 2589323490u, 1884430765u, 3739058655u, |
2534 | 2419330954u, 355389916u, 273950915u, 3670136553u, |
2535 | 410946824u, |
2536 | 3174041420u, |
2537 | 2609010298u, 3059091350u, 2300275014u, 725729828u, |
2538 | 2548380995u, 1738849964u, 1257081412u, 79430455u, |
2539 | 810321297u, |
2540 | 3246190593u, |
2541 | 1007937684u, 912115394u, 40880059u, 3450073327u, |
2542 | 4289832174u, 2253485111u, 1065639151u, 2953189309u, |
2543 | 124779113u, |
2544 | 654299738u, |
2545 | 115760833u, 1250932069u, 884995826u, 3998908281u, |
2546 | 1382882981u, 1134187162u, 3202324501u, 487502928u, |
2547 | 3032756345u, |
2548 | 4057517628u, |
2549 | 933197381u, 2319223127u, 2044528655u, 2554572663u, |
2550 | 4049450620u, 1620812836u, 2832905391u, 2273005481u, |
2551 | 1913090121u, |
2552 | 1055456023u, |
2553 | 510593296u, 3285343192u, 2912822536u, 1645225063u, |
2554 | 638418430u, 452701300u, 1025483165u, 1639370512u, |
2555 | 167948643u, |
2556 | 2809842730u, |
2557 | 2983135664u, 407521332u, 1543756616u, 3949773145u, |
2558 | 4283462892u, 659962275u, 3878013463u, 1000748756u, |
2559 | 4053212051u, |
2560 | 4099239406u, |
2561 | 3467581965u, 354635541u, 21301844u, 3831212473u, |
2562 | 3189450571u, 2264401966u, 4096484849u, 1736448515u, |
2563 | 3976926096u, |
2564 | 3727194724u, |
2565 | 2243487039u, 585209095u, 3143046007u, 969558123u, |
2566 | 3037113502u, 3594170243u, 2835860223u, 3775493975u, |
2567 | 2787220812u, |
2568 | 2274252217u, |
2569 | 2915380701u, 3077533278u, 1252871826u, 1519790952u, |
2570 | 205297661u, 2950557658u, 3956882191u, 2724439401u, |
2571 | 3694608025u, |
2572 | 124028038u, |
2573 | 216019153u, 1533010676u, 2259986336u, 2014061617u, |
2574 | 2068617849u, 3078123052u, 2692046098u, 1582812948u, |
2575 | 396916232u, |
2576 | 1470894001u, |
2577 | 1694309312u, 300268215u, 1553892743u, 671176040u, |
2578 | 1544988994u, 2793402821u, 4194972569u, 2296476154u, |
2579 | 748354332u, |
2580 | 3491325898u, |
2581 | 4261053291u, 1104998242u, 797816835u, 243564059u, |
2582 | 2197717393u, 299029458u, 1675252188u, 3139770041u, |
2583 | 583018574u, |
2584 | 2532106100u, |
2585 | 2099391658u, 3760526730u, 3422719327u, 3556917689u, |
2586 | 2374009285u, 2130865894u, 3710563151u, 1437538307u, |
2587 | 3938030842u, |
2588 | 2006930694u, |
2589 | 2151243336u, 1939741287u, 1957068175u, 2135147479u, |
2590 | 649553342u, 1713643042u, 4188696599u, 1698739939u, |
2591 | 3549427584u, |
2592 | 1016382174u, |
2593 | 322644378u, 2476164549u, 2037263020u, 88036019u, |
2594 | 2548960923u, 539867919u, 2871157727u, 4031659929u, |
2595 | 754087252u, |
2596 | 972656559u, |
2597 | 4246379429u, 3877308578u, 2059459630u, 3614934323u, |
2598 | 1410565271u, 2102980459u, 215395636u, 1083393481u, |
2599 | 3775523015u, |
2600 | 2062750105u, |
2601 | 2475645882u, 3041186774u, 3534315423u, 758607219u, |
2602 | 1686100614u, 180500983u, 1155581185u, 1476664671u, |
2603 | 2918661695u, |
2604 | 3812731350u, |
2605 | 4003853737u, 4148884881u, 1468469436u, 3278880418u, |
2606 | 1045838071u, 1049161262u, 360450415u, 3158065524u, |
2607 | 814443735u, |
2608 | 3391401707u, |
2609 | 729968410u, 738771593u, 3662738792u, 1672830580u, |
2610 | 4199496163u, 188487238u, 219098233u, 2141731267u, |
2611 | 3890250614u, |
2612 | 2988780375u, |
2613 | 4026279523u, 3489429375u, 2468433807u, 1178270701u, |
2614 | 2685094218u, 2716621497u, 3718335529u, 2273344755u, |
2615 | 701110882u, |
2616 | 1925717409u, |
2617 | 1515176562u, 2325460593u, 3954798930u, 784566105u, |
2618 | 3769422266u, 1641530321u, 2703876862u, 2907480267u, |
2619 | 1828076455u, |
2620 | 1805635221u, |
2621 | 3883381245u, 1476756210u, 2072514392u, 3658557081u, |
2622 | 2003610746u, 2556845550u, 729594004u, 3303898266u, |
2623 | 1968227254u, |
2624 | 423204951u, |
2625 | 231828688u, 4223697811u, 698619045u, 3636824418u, |
2626 | 2738779239u, 2333529003u, 2833158642u, 580285428u, |
2627 | 3038148234u, |
2628 | 1012378004u, |
2629 | 1113647298u, 1424593483u, 4053247723u, 1167152941u, |
2630 | 2677383578u, 3419485379u, 2135673840u, 440478166u, |
2631 | 1682229112u, |
2632 | 3226724137u, |
2633 | 1217439806u, 3828726923u, 3636576271u, 3467643156u, |
2634 | 2005614908u, 2655346461u, 2345488441u, 1027557096u, |
2635 | 3594084220u, |
2636 | 1372306343u, |
2637 | 2342583762u, 4291342905u, 4094931814u, 3254771759u, |
2638 | 821978248u, 2404930117u, 1143937655u, 3156949255u, |
2639 | 3460606610u, |
2640 | 449701786u, |
2641 | 3474906110u, 1932585294u, 2283357584u, 1808481478u, |
2642 | 3522851029u, 3040164731u, 1530172182u, 2950426149u, |
2643 | 1402416557u, |
2644 | 756419859u, |
2645 | 4132576145u, 724994790u, 2852015871u, 2177908339u, |
2646 | 899914731u, 139675671u, 1423281870u, 3198458070u, |
2647 | 807581308u, |
2648 | 2021611521u, |
2649 | 1801452575u, 1425984297u, 2833835949u, 1536827865u, |
2650 | 3902351840u, 164546042u, 1872840974u, 3986194780u, |
2651 | 792156290u, |
2652 | 3378681896u, |
2653 | 941547959u, 3931328334u, 3661060482u, 2386420777u, |
2654 | 3920146272u, 3458621279u, 3348500844u, 2269586542u, |
2655 | 797371473u, |
2656 | 3188953649u, |
2657 | 80514771u, 2913333490u, 1246325623u, 3253846094u, |
2658 | 1723906239u, 1606413555u, 587500718u, 1412413859u, |
2659 | 2310046829u, |
2660 | 2113313263u, |
2661 | 3855635608u, 47271944u, 1112281934u, 3440228404u, |
2662 | 2633519166u, 425094457u, 307659635u, 67338587u, |
2663 | 2412987939u, |
2664 | 2363930989u, |
2665 | 2853008596u, 2844637339u, 922568813u, 130379293u, |
2666 | 2825204405u, 2904442145u, 1176875333u, 1511685505u, |
2667 | 599177514u, |
2668 | 1872681372u, |
2669 | 682394826u, 1888849790u, 3635304282u, 1761257265u, |
2670 | 1571292431u, 355247075u, 1177210823u, 1691529530u, |
2671 | 3629531121u, |
2672 | 3760474006u, |
2673 | 1129340625u, 868116266u, 3908237785u, 1942124366u, |
2674 | 1266630014u, 3214841995u, 334023850u, 1110037019u, |
2675 | 369650727u, |
2676 | 1288666741u, |
2677 | 70535706u, 20230114u, 4284225520u, 727856157u, |
2678 | 293696779u, 1244943770u, 3976592462u, 560421917u, |
2679 | 4171688499u, |
2680 | 2438786950u, |
2681 | 1218144639u, 3809125983u, 1302395746u, 534542359u, |
2682 | 2121993015u, 2899519374u, 3192177626u, 1761707794u, |
2683 | 3101683464u, |
2684 | 1555403906u, |
2685 | 3225675390u, 1875263768u, 4278894569u, 651707603u, |
2686 | 2111591484u, 3802716028u, 2900262228u, 1181469202u, |
2687 | 3254743797u, |
2688 | 1822684466u, |
2689 | 860641829u, 3046128268u, 1284833012u, 1125261608u, |
2690 | 461384524u, 2331344566u, 1274400010u, 990498321u, |
2691 | 3462536298u, |
2692 | 3796842585u, |
2693 | 2346607194u, 279495949u, 3951194590u, 3522664971u, |
2694 | 3169688303u, 726831706u, 1123875117u, 1816166599u, |
2695 | 3759808754u, |
2696 | 2918558151u, |
2697 | 3713203220u, 3369939267u, 466047109u, 384042536u, |
2698 | 587271104u, 2191634696u, 2449929095u, 1157932232u, |
2699 | 2084466674u, |
2700 | 841370485u, |
2701 | 3241372562u, 4277738486u, 2150836793u, 1173569449u, |
2702 | 778768930u, 2594706485u, 3065269405u, 3019263663u, |
2703 | 2660146610u, |
2704 | 2789946230u, |
2705 | 77056913u, 728174395u, 3647185904u, 804562358u, |
2706 | 2697276483u, 881311175u, 1178696435u, 2059173891u, |
2707 | 2308303791u, |
2708 | 221481230u, |
2709 | 50241451u, 3689414100u, 1969074761u, 2732071529u, |
2710 | 1900890356u, 840789500u, 2100609300u, 985565597u, |
2711 | 1220850414u, |
2712 | 2456636259u, |
2713 | 223607678u, 1016310244u, 1937434395u, 85717256u, |
2714 | 275058190u, 3712011133u, 171916016u, 2389569096u, |
2715 | 3679765802u, |
2716 | 3575358777u, |
2717 | 3481108261u, 3178286380u, 2489642395u, 2931039055u, |
2718 | 3086601621u, 3079518902u, 3027718495u, 2506894644u, |
2719 | 2976869602u, |
2720 | 2134336365u, |
2721 | 2420172217u, 918054427u, 661522682u, 1403791357u, |
2722 | 3587174388u, 2623673551u, 1355661457u, 4159477684u, |
2723 | 1109013587u, |
2724 | 3112183488u, |
2725 | 2217849279u, 3500291996u, 2419603731u, 2929886201u, |
2726 | 3854470013u, 1358382103u, 1357666555u, 21053566u, |
2727 | 2716621233u, |
2728 | 3094836862u, |
2729 | 3309729704u, 57086558u, 839187419u, 2757944838u, |
2730 | 3651040558u, 3607536716u, 3691257732u, 2312878285u, |
2731 | 1202511724u, |
2732 | 183479927u, |
2733 | 2509829803u, 109313218u, 478173887u, 2072044014u, |
2734 | 190631406u, 2495604975u, 1010416260u, 3679857586u, |
2735 | 726566957u, |
2736 | 258500881u, |
2737 | 1805873908u, 3081447051u, 2352101327u, 534922207u, |
2738 | 1584552873u, 813470716u, 255914637u, 249169434u, |
2739 | 3193498057u, |
2740 | 1038802706u, |
2741 | 2590158653u, 3147907290u, 663060128u, 1156177857u, |
2742 | 634616100u, 312879189u, 1545020368u, 2054634247u, |
2743 | 3271451914u, |
2744 | 3438291534u, |
2745 | 2181454946u, 3864535432u, 2398586877u, 896491075u, |
2746 | 2810631478u, 2770357487u, 3372930052u, 898070638u, |
2747 | 2051007323u, |
2748 | 392959778u, |
2749 | 36645539u, 3743556044u, 4134529680u, 4124451188u, |
2750 | 566806297u, 2936523982u, 1304761965u, 537399498u, |
2751 | 1940818842u, |
2752 | 40862381u, |
2753 | 36288410u, 3063605629u, 2826611650u, 3961972098u, |
2754 | 1871578006u, 2392095486u, 1136931591u, 513864488u, |
2755 | 173276451u, |
2756 | 3039055682u, |
2757 | 3543322032u, 1943592006u, 657217094u, 1751698246u, |
2758 | 2969618445u, 456616022u, 900309519u, 113892716u, |
2759 | 1126392103u, |
2760 | 1235651045u, |
2761 | 1882073852u, 2136610853u, 2353639710u, 2819956700u, |
2762 | 3980083530u, 828773559u, 224069850u, 902434120u, |
2763 | 2802008036u, |
2764 | 94358995u, |
2765 | 2777723394u, 2812641403u, 2525832595u, 4157388110u, |
2766 | 4235563782u, 937800324u, 141690749u, 568062536u, |
2767 | 550123849u, |
2768 | 1330316521u, |
2769 | 1949488696u, 2296431366u, 1958465262u, 3564751729u, |
2770 | 3748252207u, 120455129u, 1607318832u, 2525729790u, |
2771 | 2640987481u, |
2772 | 2332096657u, |
2773 | 1775969159u, 1555085077u, 2913525137u, 1347085183u, |
2774 | 2376253113u, 3194050574u, 1806090610u, 678641356u, |
2775 | 1499146713u, |
2776 | 383849715u, |
2777 | 3299835823u, 2284860330u, 2614269636u, 3913628844u, |
2778 | 2761334210u, 1959484587u, 529797021u, 239966995u, |
2779 | 3102194829u, |
2780 | 3602307804u, |
2781 | 1122192627u, 3577510006u, 164486066u, 1680137310u, |
2782 | 1473396395u, 1467801424u, 903493660u, 1185943071u, |
2783 | 2798556505u, |
2784 | 2306744492u, |
2785 | 3167201310u, 3577947177u, 3067592134u, 2905506289u, |
2786 | 1210366329u, 204484056u, 2347778932u, 3862374472u, |
2787 | 3277439508u, |
2788 | 4187414621u, |
2789 | 1646699310u, 621385800u, 3934869089u, 3975491588u, |
2790 | 3580085916u, 1925674500u, 2436305348u, 3983301539u, |
2791 | 2739439523u, |
2792 | 3291507446u, |
2793 | 3395637920u, 3753389171u, 2955202032u, 2654255623u, |
2794 | 3771089254u, 2140443405u, 2779834738u, 3261942805u, |
2795 | 3526889244u, |
2796 | 1842009139u, |
2797 | 4048484340u, 2106218403u, 2161244271u, 772152700u, |
2798 | 1158647659u, 3776791619u, 3882186721u, 699525237u, |
2799 | 2954670460u, |
2800 | 1007105869u, |
2801 | 3359152025u, 1146388699u, 1401550303u, 2326582541u, |
2802 | 4181783540u, 1085644043u, 1942143795u, 1038368308u, |
2803 | 1526153809u, |
2804 | 4042547244u, |
2805 | 1891441000u, 2573991874u, 1281441253u, 3635098284u, |
2806 | 1980545715u, 825985487u, 3934748116u, 4228386979u, |
2807 | 1480870944u, |
2808 | 1042194545u, |
2809 | 2397771642u, 2248490001u, 3817869868u, 878654626u, |
2810 | 3785629484u, 1672470870u, 3229367873u, 1894538933u, |
2811 | 1010692731u, |
2812 | 1733824268u, |
2813 | 656620328u, 3048283803u, 3353340056u, 2324965120u, |
2814 | 4192585951u, 2284524675u, 3483884368u, 1510168293u, |
2815 | 1554942691u, |
2816 | 1309709396u, |
2817 | 1241133168u, 3162179280u, 4046378054u, 3171681593u, |
2818 | 1165297136u, 3496703563u, 150437903u, 1948622072u, |
2819 | 1076332463u, |
2820 | 2292479143u, |
2821 | 1464229958u, 3479738093u, 2328067598u, 2334503110u, |
2822 | 833324834u, 3981605747u, 3002629155u, 2854644186u, |
2823 | 2832201336u, |
2824 | 95796957u, |
2825 | 3269249397u, 2358313329u, 3411860910u, 4283292480u, |
2826 | 2802208697u, 1305947955u, 2156803420u, 1991340283u, |
2827 | 189678024u, |
2828 | 447602599u, |
2829 | 1055411517u, 1531748363u, 1555852656u, 412402681u, |
2830 | 3774988152u, 20597551u, 2925024131u, 1423989620u, |
2831 | 3749428061u, |
2832 | 1541439448u, |
2833 | 112270416u, 1936224776u, 132162941u, 3772011507u, |
2834 | 3814102518u, 1908807815u, 444154079u, 823765347u, |
2835 | 3362275567u, |
2836 | 3419047430u, |
2837 | 2108287005u, 2315102125u, 658593738u, 3195094029u, |
2838 | 3721937534u, 3176229204u, 3398835373u, 1271898712u, |
2839 | 1142546577u, |
2840 | 3185986817u, |
2841 | 3562705803u, 2046119567u, 912990621u, 1829977672u, |
2842 | 3459576979u, 1118045834u, 1369529376u, 3320601076u, |
2843 | 3954988953u, |
2844 | 4002467635u, |
2845 | 3359456351u, 1314849568u, 1766750942u, 2998874853u, |
2846 | 1181800239u, 707328036u, 3314954697u, 2066721120u, |
2847 | 598194215u, |
2848 | 1124451278u, |
2849 | 3156679616u, 3742684743u, 2960199690u, 2683497915u, |
2850 | 2566077529u, 937014607u, 102095219u, 4262922475u, |
2851 | 3132264275u, |
2852 | 1262099830u, |
2853 | 862722905u, 2717653494u, 3245583534u, 3427209989u, |
2854 | 3220278124u, 85457091u, 2222333500u, 3513997967u, |
2855 | 3522324951u, |
2856 | 2830855552u, |
2857 | 2215004781u, 3482411840u, 4227160614u, 2030964411u, |
2858 | 1741393851u, 2643723748u, 942813508u, 403442675u, |
2859 | 3112048748u, |
2860 | 530556423u, |
2861 | 3817755244u, 3543286628u, 2247276090u, 1532920842u, |
2862 | 4101962711u, 1446540991u, 3297821473u, 1861255389u, |
2863 | 1984398u, |
2864 | 2366525138u, |
2865 | 377589481u, 3549193828u, 1427765914u, 506831657u, |
2866 | 277278988u, 1447652775u, 3214362239u, 3142198690u, |
2867 | 2843087541u, |
2868 | 468915015u, |
2869 | 807895062u, 2198723907u, 4031145069u, 2417156212u, |
2870 | 4027298697u, 637175947u, 1229254212u, 1773257887u, |
2871 | 1659444818u, |
2872 | 451148891u, |
2873 | 2099741368u, 735351990u, 2534775713u, 3261804619u, |
2874 | 712519954u, 3527962772u, 3758642738u, 4245823575u, |
2875 | 1281314264u, |
2876 | 1167866160u, |
2877 | 1489546151u, 1197354389u, 1043278102u, 2563326586u, |
2878 | 371937794u, 2320164817u, 3189512691u, 573685198u, |
2879 | 4108603513u, |
2880 | 3758899588u, |
2881 | 3507030163u, 2947201212u, 2529492585u, 578234375u, |
2882 | 3362349842u, 3318878925u, 3611203517u, 3059253190u, |
2883 | 4270755916u, |
2884 | 4291274625u, |
2885 | 4237586791u, 4137422245u, 2927218651u, 2444687041u, |
2886 | 797128811u, 2043057612u, 396533859u, 2665256178u, |
2887 | 3346510674u, |
2888 | 1779586176u, |
2889 | 3076562062u, 1882746214u, 921095362u, 2026988397u, |
2890 | 514514911u, 3886379478u, 4218272420u, 1480386793u, |
2891 | 3900160816u, |
2892 | 2292273451u, |
2893 | 1276138356u, 1125461821u, 1912885715u, 3365266013u, |
2894 | 1333211627u, 4085009861u, 1390530102u, 3347984752u, |
2895 | 2721771301u, |
2896 | 1419492325u, |
2897 | 4066766256u, 3250852311u, 820111852u, 1382201318u, |
2898 | 2366036798u, 938032241u, 3100979439u, 487048687u, |
2899 | 2292851045u, |
2900 | 3241399180u, |
2901 | 3912670510u, 2416437067u, 2973194517u, 3507707986u, |
2902 | 1935099406u, 2533441488u, 104616731u, 2892622820u, |
2903 | 3801190339u, |
2904 | 4239188808u, |
2905 | 807238241u, 3300121546u, 2249406147u, 4032114017u, |
2906 | 3713738189u, 3324425575u, 4275607376u, 3663120298u, |
2907 | 4173658372u, |
2908 | 3984289690u, |
2909 | 1827636846u, 3264588778u, 3297165529u, 558623533u, |
2910 | 2728945672u, 1566297318u, 3447249966u, 481719551u, |
2911 | 1596842050u, |
2912 | 1838185946u, |
2913 | 265271620u, 1050246315u, 4046655705u, 1844193138u, |
2914 | 3807563245u, 1075384804u, 1292554949u, 1506525927u, |
2915 | 2921816148u, |
2916 | 2051885269u, |
2917 | 1930534041u, 3872721086u, 1564489377u, 2272482181u, |
2918 | 2849358683u, 589618304u, 2262072443u, 290363051u, |
2919 | 299168363u, |
2920 | 3867603931u, |
2921 | 2868688756u, 2545263115u, 1092098533u, 3885725603u, |
2922 | 2352430409u, 1981595469u, 2047946646u, 1332642839u, |
2923 | 793806516u, |
2924 | 214858837u, |
2925 | 1061484659u, 3192394476u, 1115054785u, 3690637234u, |
2926 | 996792368u, 2023479706u, 3046498231u, 4205835102u, |
2927 | 3870714754u, |
2928 | 257472875u, |
2929 | 3549864599u, 2040276129u, 2414778670u, 812235477u, |
2930 | 2674248196u, 1864096101u, 2257492689u, 1332556794u, |
2931 | 1079540713u, |
2932 | 465530720u, |
2933 | 2304763972u, 830724724u, 3354588920u, 2510713652u, |
2934 | 3103749409u, 468835585u, 1707620787u, 3038024846u, |
2935 | 1000303198u, |
2936 | 3462270146u, |
2937 | 2748698899u, 2100348093u, 511537258u, 1237187486u, |
2938 | 102049383u, 2268226698u, 3162251739u, 4219404629u, |
2939 | 838822407u, |
2940 | 1481440623u, |
2941 | 2989224077u, 2676681975u, 3246551821u, 3812079906u, |
2942 | 370572963u, 2283154352u, 3084789986u, 1961085583u, |
2943 | 1955640586u, |
2944 | 2409348147u, |
2945 | 2284780581u, 1634818716u, 4018221729u, 2320761377u, |
2946 | 3566831899u, 1799560520u, 91431959u, 1754113747u, |
2947 | 1459430477u, |
2948 | 3613658517u, |
2949 | 924489906u, 3406317699u, 866289774u, 3924821603u, |
2950 | 1265394945u, 1870668109u, 151949856u, 2747006534u, |
2951 | 3111906201u, |
2952 | 64039467u, |
2953 | 2314447545u, 2600195638u, 4095795204u, 4162096026u, |
2954 | 1026756826u, 2460047982u, 52686887u, 823198739u, |
2955 | 1518045160u, |
2956 | 2867527376u, |
2957 | 566410761u, 2200433819u, 2114146405u, 2893790965u, |
2958 | 881504901u, 974783212u, 490815659u, 937300283u, |
2959 | 1523735309u, |
2960 | 2511976468u, |
2961 | 2634644947u, 355119367u, 1373773092u, 309232995u, |
2962 | 3088671051u, 787126032u, 3442836843u, 4289194567u, |
2963 | 2177850062u, |
2964 | 1174136430u, |
2965 | 3248982914u, 3129039732u, 1166851580u, 2196451882u, |
2966 | 469595580u, 2130837700u, 3783349021u, 3745262548u, |
2967 | 1236930515u, |
2968 | 3032131496u, |
2969 | 1525591437u, 1823628217u, 1939019255u, 1950270463u, |
2970 | 3659899927u, 3688643445u, 3004399289u, 1155199552u, |
2971 | 357547234u, |
2972 | 2213110526u, |
2973 | 3122658210u, 2667800490u, 2718690333u, 3512372076u, |
2974 | 1098611683u, 2657518392u, 4248458835u, 3109874532u, |
2975 | 1592908438u, |
2976 | 2864927516u, |
2977 | 3635248840u, 1251777186u, 3797340158u, 3508496870u, |
2978 | 303354834u, 1482394062u, 2087100120u, 1595931912u, |
2979 | 608574156u, |
2980 | 723367884u, |
2981 | 907938402u, 3357047807u, 1619629851u, 3092082995u, |
2982 | 89030300u, 916336992u, 1861180168u, 3436334155u, |
2983 | 1375000544u, |
2984 | 3472936241u, |
2985 | 1321217853u, 791356402u, 2872410224u, 2326250297u, |
2986 | 2657644088u, 1748314108u, 4146771421u, 2913114440u, |
2987 | 2924821844u, |
2988 | 2101101496u, |
2989 | 3268017251u, 2109603066u, 690665520u, 1830067573u, |
2990 | 951427661u, 2982533150u, 3884512506u, 2358657479u, |
2991 | 2833210784u, |
2992 | 3419798214u, |
2993 | 3785893994u, 2103940206u, 86759766u, 4031230616u, |
2994 | 3745237192u, 2739453927u, 497038072u, 3303159408u, |
2995 | 1251537249u, |
2996 | 1993408196u, |
2997 | 3185905715u, 2885948408u, 3154277110u, 2444150313u, |
2998 | 2505582079u, 2120610195u, 3266465773u, 1814611964u, |
2999 | 3080050407u, |
3000 | 1079915522u, |
3001 | 1819346505u, 2529946763u, 892097374u, 3740257161u, |
3002 | 3618100441u, 1079900094u, 3607172225u, 737863389u, |
3003 | 360704560u, |
3004 | 3341993089u, |
3005 | 1139047381u, 3132219631u, 1248981859u, 1109338159u, |
3006 | 2004908615u, 4022302594u, 4166640860u, 2959140950u, |
3007 | 3949235962u, |
3008 | 2832278473u, |
3009 | 2200524012u, 2634933043u, 2495844522u, 2613799818u, |
3010 | 4034096813u, 683271795u, 1673546817u, 1363163726u, |
3011 | 1805395136u, |
3012 | 511749501u, |
3013 | 1231032599u, 2305979751u, 345737783u, 3339868854u, |
3014 | 2931857933u, 2323251738u, 1332068477u, 51846558u, |
3015 | 3927238177u, |
3016 | 1387182179u, |
3017 | 1701238601u, 1419275173u, 2580882268u, 3357874599u, |
3018 | 1726558907u, 1292901039u, 1371322339u, 1311713044u, |
3019 | 3526735232u, |
3020 | 4017884184u, |
3021 | 3366093428u, 77140994u, 2128996229u, 1357915765u, |
3022 | 4019691901u, 483989024u, 2390311750u, 2766065288u, |
3023 | 3938587520u, |
3024 | 3064810344u, |
3025 | 1054589198u, 1274997019u, 4040589616u, 1277751144u, |
3026 | 2274907047u, 4170399945u, 2886368209u, 4168922115u, |
3027 | 3901237033u, |
3028 | 3252972311u, |
3029 | 2205185840u, 3403097556u, 3385493699u, 2809751370u, |
3030 | 555319628u, 399539034u, 2998971454u, 1521596214u, |
3031 | 178870216u, |
3032 | 1471733541u, |
3033 | 519629198u, 514159209u, 1500582242u, 1928616587u, |
3034 | 2686427928u, 4133138798u, 1225914083u, 1432713584u, |
3035 | 3559310915u, |
3036 | 3925489366u, |
3037 | 1055613123u, 4126676029u, 2723867653u, 3290604111u, |
3038 | 1377022957u, 2373608155u, 3615237379u, 594338683u, |
3039 | 2645257602u, |
3040 | 2408427260u, |
3041 | 917033274u, 750455097u, 625657657u, 121713200u, |
3042 | 2191273413u, 4043949724u, 3293146785u, 3809297972u, |
3043 | 3947296919u, |
3044 | 115456894u, |
3045 | 1529576616u, 1459278275u, 2157117997u, 1747859293u, |
3046 | 4106665903u, 996939232u, 2007976332u, 4274649009u, |
3047 | 1017725787u, |
3048 | 4244666096u, |
3049 | 1219631331u, 3072426253u, 3547691720u, 1620822012u, |
3050 | 1397717508u, 2031597325u, 3345983430u, 2459068000u, |
3051 | 3645130467u, |
3052 | 2308642742u, |
3053 | 359955852u, 1348467968u, 1133123059u, 2435919062u, |
3054 | 2800365907u, 4213217210u, 4056565603u, 2811666556u, |
3055 | 2318007236u, |
3056 | 3823652401u, |
3057 | 3654086429u, 1273260424u, 1591610446u, 943349350u, |
3058 | 3441227678u, 3779964757u, 233818224u, 3469971032u, |
3059 | 3764095096u, |
3060 | 4009204587u, |
3061 | 678472092u, 1990559652u, 2583121088u, 2978143652u, |
3062 | 2496370864u, 2139539656u, 4287972050u, 295832576u, |
3063 | 3536742861u, |
3064 | 2257466133u, |
3065 | 2738052161u, 1988611898u, 2466189642u, 3294419573u, |
3066 | 2311186273u, 474374532u, 3081964174u, 2515138278u, |
3067 | 835731677u, |
3068 | 1178182694u, |
3069 | 3352119543u, 2884763225u, 3462399574u, 2900817210u, |
3070 | 1993698511u, 2868445043u, 2746444849u, 1205258179u, |
3071 | 2353442946u, |
3072 | 4079040070u, |
3073 | 3624133102u, 2907136076u, 2902521697u, 426813211u, |
3074 | 1418185512u, 3711189488u, 1351506552u, 1934749519u, |
3075 | 46595543u, |
3076 | 401688809u, |
3077 | 3514602124u, 1396852607u, 1951477943u, 2502249173u, |
3078 | 3199695820u, 2890250638u, 4205072507u, 1715623846u, |
3079 | 3266686789u, |
3080 | 3218688128u, |
3081 | 1697759742u, 851227671u, 2358709645u, 4174233268u, |
3082 | 500583683u, 3805940955u, 736234120u, 2710563712u, |
3083 | 1949664540u, |
3084 | 3139414003u, |
3085 | 4293073253u, 1284406972u, 1785182449u, 1051548274u, |
3086 | 2994248357u, 2499882522u, 717208669u, 2039517285u, |
3087 | 518424929u, |
3088 | 143136433u, |
3089 | 2303774671u, 1272930860u, 2286410920u, 788459311u, |
3090 | 273225293u, 2439291703u, 2254505236u, 3446287701u, |
3091 | 3655156558u, |
3092 | 1546628787u, |
3093 | 340081500u, 3285722006u, 1324810435u, 1053980860u, |
3094 | 1779472859u, 2700355724u, 686005017u, 3762376315u, |
3095 | 3963193100u, |
3096 | 1370881135u, |
3097 | 661300087u, 1152753704u, 2349891598u, 3910051187u, |
3098 | 2109444785u, 1311123870u, 2639837565u, 1896770931u, |
3099 | 1081414128u, |
3100 | 869877586u, |
3101 | 4284220400u, 63045374u, 235968615u, 184451062u, |
3102 | 1271099822u, 1319179857u, 3274963209u, 4172272710u, |
3103 | 3388797445u, |
3104 | 2965973320u, |
3105 | 3793110097u, 3327241723u, 2991804005u, 1199544355u, |
3106 | 771553759u, 2031749842u, 2596517372u, 1199888213u, |
3107 | 858347951u, |
3108 | 3340178832u, |
3109 | 2903875412u, 763490382u, 76949161u, 2056544406u, |
3110 | 1145227689u, 998233136u, 2354530024u, 427713587u, |
3111 | 3537837347u, |
3112 | 604661755u, |
3113 | 923986833u, 1023730418u, 798294227u, 432557449u, |
3114 | 801802449u, 1861313429u, 3899128441u, 4068407979u, |
3115 | 2352677083u, |
3116 | 3783539925u, |
3117 | 10731973u, 3390767975u, 3949540249u, 1920121661u, |
3118 | 3248580201u, 641956426u, 2104847395u, 604835744u, |
3119 | 1491663404u, |
3120 | 4255204651u, |
3121 | 1520970746u, 2845653368u, 3247412938u, 3730629005u, |
3122 | 855569514u, 3073294700u, 2429691698u, 3818342476u, |
3123 | 3938869985u, |
3124 | 2731201328u, |
3125 | 2335202643u, 778117742u, 13298408u, 228780590u, |
3126 | 2871715314u, 3253688653u, 4150999702u, 3846220408u, |
3127 | 930808u, |
3128 | 1397128726u, |
3129 | 1964216488u, 2781092828u, 116285375u, 2271239476u, |
3130 | 3724347554u, 2931203895u, 3893169206u, 1883912528u, |
3131 | 2093892660u, |
3132 | 3658787024u, |
3133 | 3095016046u, 1094059199u, 3640239610u, 558564267u, |
3134 | 2102812456u, 464734873u, 925262247u, 1609838036u, |
3135 | 588364741u, |
3136 | 1731409233u, |
3137 | 1576165139u, 3933979268u, 375316394u, 4247099643u, |
3138 | 3670508019u, 4080496835u, 2371248533u, 183762693u, |
3139 | 2078935389u, |
3140 | 2699810414u, |
3141 | 1491815683u, 2999180789u, 1831158425u, 1603373553u, |
3142 | 2006136905u, 3210230591u, 416748595u, 1536971415u, |
3143 | 3271869367u, |
3144 | 1266062739u, |
3145 | 2138414557u, 3337114778u, 1634586826u, 36472629u, |
3146 | 4482244u, 568009609u, 2721216780u, 4037289545u, |
3147 | 2235138807u, |
3148 | 1789351460u, |
3149 | 4067539527u, 1323062829u, 3864620647u, 4192026301u, |
3150 | 4278901241u, 1399025382u, 2826652805u, 1363860382u, |
3151 | 1801770651u, |
3152 | 1613381526u, |
3153 | 1165249276u, 4046576622u, 2535596946u, 3260388176u, |
3154 | 1078898578u, 2259750862u, 643387587u, 237144235u, |
3155 | 4199571427u, |
3156 | 3440917581u, |
3157 | 3067939258u, 2018625455u, 1460528353u, 3138629939u, |
3158 | 1666223528u, 3841139376u, 2528281125u, 885565193u, |
3159 | 2609492686u, |
3160 | 2517257479u, |
3161 | 560864620u, 2261471820u, 3491559165u, 1329620416u, |
3162 | 622383582u, 1759597655u, 2877873893u, 584692817u, |
3163 | 1901728399u, |
3164 | 2599000260u, |
3165 | 3169771644u, 296332336u, 774719455u, 4175920823u, |
3166 | 2287316070u, 4115615023u, 1073335619u, 4240292725u, |
3167 | 1359158837u, |
3168 | 1960974237u, |
3169 | 3173724597u, 1619084286u, 2876340752u, 4065675347u, |
3170 | 480741335u, 1237329941u, 701055566u, 3729009837u, |
3171 | 1314736422u, |
3172 | 4003180069u, |
3173 | 3118519317u, 3035354420u, 3380357671u, 4020909015u, |
3174 | 253958714u, 3545798863u, 3008185002u, 2624719888u, |
3175 | 3219955575u, |
3176 | 3060719376u, |
3177 | 573101682u, 1580316843u, 2610493412u, 3490983536u, |
3178 | 3601975611u, 851470366u, 635384901u, 3427048824u, |
3179 | 1470002757u, |
3180 | 3592460087u, |
3181 | 2265226856u, 4124282457u, 2106385486u, 3334305617u, |
3182 | 4208282753u, 3798749815u, 225396466u, 118791182u, |
3183 | 2523395972u, |
3184 | 194595464u, |
3185 | 2563824631u, 2521301383u, 4224409406u, 468670274u, |
3186 | 1761966400u, 1300908277u, 2570709228u, 1847901526u, |
3187 | 1470099163u, |
3188 | 2690466752u, |
3189 | 1472536718u, 2399279735u, 4150607803u, 1775080054u, |
3190 | 2082537685u, 4080034578u, 1256001880u, 392967725u, |
3191 | 2055838940u, |
3192 | 3349115816u, |
3193 | 1745947263u, 2213925887u, 1836572741u, 2417722792u, |
3194 | 636223705u, 2423329294u, 3960951311u, 1543591052u, |
3195 | 1547914361u, |
3196 | 2760945653u, |
3197 | 3519014111u, 313543871u, 4119598884u, 1071003714u, |
3198 | 2192556597u, 1526995535u, 3929839778u, 536388591u, |
3199 | 3040873792u, |
3200 | 3752682932u, |
3201 | 1640614237u, 2432794021u, 385337403u, 2794410617u, |
3202 | 2386128075u, 1055206708u, 1422747714u, 3759330929u, |
3203 | 2533597496u, |
3204 | 30440955u, |
3205 | 1482899460u, 3350385050u, 616259409u, 3980103795u, |
3206 | 1211364140u, 1040071544u, 594746920u, 1645973936u, |
3207 | 2547331531u, |
3208 | 1097726368u, |
3209 | 700666526u, 2976247482u, 1144906608u, 996506677u, |
3210 | 1997130756u, 800321417u, 1392942823u, 1601662248u, |
3211 | 2079778663u, |
3212 | 529512908u, |
3213 | 2925120134u, 4106433085u, 630221833u, 2423086156u, |
3214 | 1119859778u, 1726827981u, 1870859181u, 2559832707u, |
3215 | 1792284257u, |
3216 | 2059356387u, |
3217 | 3572353364u, 3229407475u, 575621095u, 3221893291u, |
3218 | 2372428048u, 2020123035u, 961449593u, 2243824063u, |
3219 | 3803906611u, |
3220 | 3735348189u, |
3221 | 2981620804u, 4180681078u, 1555330629u, 230736535u, |
3222 | 2075526640u, 749652975u, 713664372u, 2152096659u, |
3223 | 2142067223u, |
3224 | 3322302242u, |
3225 | 1421646830u, 2092832615u, 1213735101u, 3192136753u, |
3226 | 1106723940u, 3455398230u, 2541685524u, 2529956739u, |
3227 | 3789430647u, |
3228 | 1950084508u, |
3229 | 2157395621u, 850457360u, 2758902426u, 2848030169u, |
3230 | 6506379u, 1162213157u, 2981459221u, 272690871u, |
3231 | 3059420255u, |
3232 | 4242691285u, |
3233 | 588065598u, 1206949936u, 3968214184u, 566348532u, |
3234 | 126142880u, 1480567086u, 2959621988u, 2050218418u, |
3235 | 2242731195u, |
3236 | 3833514449u, |
3237 | 1898070331u, 3687399477u, 3891859374u, 868185955u, |
3238 | 2335308774u, 3676335246u, 3871121805u, 2189032743u, |
3239 | 3275728647u, |
3240 | 860492892u, |
3241 | 1590764344u, 4130384758u, 262871548u, 3004764525u, |
3242 | 2685542071u, 991231482u, 435122019u, 3031116998u, |
3243 | 2898921700u, |
3244 | 2917932604u, |
3245 | 4238665148u, 2459072654u, 3444612545u, 4207731740u, |
3246 | 1808564313u, 2798532269u, 3944553556u, 3926395409u, |
3247 | 1633200670u, |
3248 | 4138335224u, |
3249 | 2524878605u, 4184292650u, 3563398268u, 4288943552u, |
3250 | 3802121210u, 957502058u, 2410820887u, 4227117506u, |
3251 | 4018625153u, |
3252 | 4284329158u, |
3253 | 530216712u, 2978986531u, 863452221u, 1910162118u, |
3254 | 4088211378u, 4091971261u, 3150811451u, 4200871487u, |
3255 | 3794038652u, |
3256 | 3041564310u, |
3257 | 2045287082u, 887805614u, 2889167251u, 4120352181u, |
3258 | 1699912580u, 3478922097u, 3211994687u, 3136177842u, |
3259 | 1500806861u, |
3260 | 3211881347u, |
3261 | 2147976385u, 3342722260u, 3359650541u, 4197378460u, |
3262 | 781354073u, 1533623029u, 2204677828u, 3228172832u, |
3263 | 3248592437u, |
3264 | 3355841359u, |
3265 | 560815159u, 1144951236u, 4027015711u, 2882625391u, |
3266 | 339363613u, 2354572719u, 1769831876u, 4238589331u, |
3267 | 1519732871u, |
3268 | 2185834614u, |
3269 | 1601096831u, 129709881u, 39655633u, 367604993u, |
3270 | 1737681770u, 3259114599u, 2767070452u, 872365177u, |
3271 | 1574125529u, |
3272 | 3405020189u, |
3273 | 4181346685u, 1134030380u, 403769171u, 2193351164u, |
3274 | 1426232618u, 2885309450u, 3033612627u, 924948363u, |
3275 | 935514094u, |
3276 | 3202053329u, |
3277 | 912294839u, 1618472324u, 4159158431u, 3744999487u, |
3278 | 777064358u, 3974213124u, 1990246048u, 309725290u, |
3279 | 2449849392u, |
3280 | 1943692420u, |
3281 | 2288635750u, 2433793635u, 2168904061u, 683315308u, |
3282 | 3081493019u, 3477759434u, 3815496269u, 2823504699u, |
3283 | 586945121u, |
3284 | 3088963200u, |
3285 | 3492287335u, 636875049u, 1111206944u, 2037346120u, |
3286 | 1282050044u, 1409681512u, 1786128584u, 755810950u, |
3287 | 2332676758u, |
3288 | 2178142310u, |
3289 | 957827166u, 1014983590u, 1888800725u, 3608595803u, |
3290 | 3200072714u, 2534008478u, 659336139u, 1281728287u, |
3291 | 4060560529u, |
3292 | 2915575125u, |
3293 | 3521503774u, 2926487340u, 1096297674u, 653489861u, |
3294 | 2352326980u, 2561136777u, 1224141198u, 1250479629u, |
3295 | 1297625391u, |
3296 | 2409997371u, |
3297 | 1942483722u, 2481835750u, 1394715707u, 1673070941u, |
3298 | 2456039704u, 3980558014u, 3547934764u, 1882038812u, |
3299 | 1078160498u, |
3300 | 2488279087u, |
3301 | 1848235245u, 1211914722u, 2264928765u, 2807773070u, |
3302 | 270145554u, 583747883u, 3826009010u, 2996618216u, |
3303 | 425727157u, |
3304 | 992726957u, |
3305 | 3384462280u, 726650661u, 1955043265u, 1923879512u, |
3306 | 1854693773u, 2987614542u, 2660044993u, 2457260810u, |
3307 | 426299370u, |
3308 | 2671892900u, |
3309 | 1827308087u, 3083953443u, 1791749638u, 3265087416u, |
3310 | 2119752201u, 2547122538u, 3990783236u, 1912713468u, |
3311 | 3688865211u, |
3312 | 1815780016u, |
3313 | 303699291u, 2416763742u, 2690891610u, 1535193548u, |
3314 | 1107803989u, 1504143133u, 2235270371u, 2545884083u, |
3315 | 2276278682u, |
3316 | 411724404u, |
3317 | 3416925704u, 2565792091u, 3383911757u, 546058824u, |
3318 | 3374654444u, 2364630415u, 2693473470u, 2622125691u, |
3319 | 261864817u, |
3320 | 55682470u, |
3321 | 857617568u, 141304067u, 1885488541u, 155368182u, |
3322 | 1281949051u, 3384522408u, 3254816901u, 1959816782u, |
3323 | 1452224057u, |
3324 | 2830267691u, |
3325 | 3709231247u, 58988202u, 4218130458u, 2984061349u, |
3326 | 1888707848u, 4223605071u, 4241442486u, 375269213u, |
3327 | 3208327038u, |
3328 | 2199916493u, |
3329 | 550337252u, 2855061437u, 276088636u, 114362204u, |
3330 | 2321163647u, 2127813633u, 3289403024u, 2686973202u, |
3331 | 2717376797u, |
3332 | 3593428039u, |
3333 | 3648831666u, 890925902u, 3289404818u, 3289516821u, |
3334 | 4248913260u, 1858916580u, 3303932308u, 1752797086u, |
3335 | 1628149686u, |
3336 | 3245893605u, |
3337 | 1568537311u, 2844194502u, 1593855770u, 2408174109u, |
3338 | 124797514u, 2085649512u, 3188565660u, 2264996276u, |
3339 | 1926696513u, |
3340 | 3053957740u, |
3341 | 2238806881u, 2189050973u, 203685243u, 379855590u, |
3342 | 3920271562u, 1058600179u, 3698061923u, 4255106849u, |
3343 | 608401664u, |
3344 | 1598041932u, |
3345 | 3318266418u, 2535016555u, 852760884u, 1918098822u, |
3346 | 2200437599u, 1532285043u, 3425662132u, 3561293706u, |
3347 | 2231633206u, |
3348 | 4108785088u, |
3349 | 3359152801u, 173534780u, 208383607u, 2862988169u, |
3350 | 2406642243u, 426814583u, 2777335795u, 3322703596u, |
3351 | 954190623u, |
3352 | 615093090u, |
3353 | 4179102978u, 2452847930u, 100239619u, 42471741u, |
3354 | 818352432u, 2190624654u, 504379960u, 3631619975u, |
3355 | 633412456u, |
3356 | 1018421783u, |
3357 | 842645419u, 711808707u, 3424580813u, 2132457941u, |
3358 | 1158335882u, 3567952480u, 2302183699u, 1145788151u, |
3359 | 3474264138u, |
3360 | 3105085243u, |
3361 | 3115506027u, 2783713015u, 3871785309u, 539583269u, |
3362 | 1400252405u, 3857849984u, 4231186588u, 1278653799u, |
3363 | 1760227022u, |
3364 | 761044088u, |
3365 | 3838185417u, 2439542532u, 585283357u, 2055995220u, |
3366 | 937117124u, 3831944855u, 1823586038u, 3287917855u, |
3367 | 485082427u, |
3368 | 3209172809u, |
3369 | 1984570176u, 2818337297u, 2691869057u, 3790476953u, |
3370 | 839035557u, 3203129010u, 669981176u, 4121157385u, |
3371 | 3519870450u, |
3372 | 3792633352u, |
3373 | 3017650322u, 1603459507u, 4225677666u, 376555451u, |
3374 | 473780127u, 2018786277u, 3299822439u, 1010254499u, |
3375 | 2383887565u, |
3376 | 3155009499u, |
3377 | 3108110655u, 2641738274u, 3684908622u, 1606463047u, |
3378 | 3311068174u, 52708046u, 754181455u, 1018079176u, |
3379 | 3915670272u, |
3380 | 3366999425u, |
3381 | 1012880204u, 1339439715u, 466437962u, 1402662350u, |
3382 | 2504046911u, 736323938u, 2037800124u, 1725908589u, |
3383 | 716341840u, |
3384 | 1750123474u, |
3385 | 3366342464u, 1743666195u, 2975303189u, 3821364027u, |
3386 | 3253707772u, 3635548377u, 3840413796u, 1955642085u, |
3387 | 1018315169u, |
3388 | 1258092848u, |
3389 | 2095540656u, 1076256607u, 117289557u, 1311658655u, |
3390 | 2118301000u, 68721550u, 2886814107u, 2712432819u, |
3391 | 4201862886u, |
3392 | 753807148u, |
3393 | 1940229047u, 731347296u, 1068901393u, 3873155894u, |
3394 | 2852787666u, 1973464853u, 79735652u, 3966380587u, |
3395 | 3245740712u, |
3396 | 2525773438u, |
3397 | 734938109u, 3045656416u, 3335746354u, 4099732691u, |
3398 | 1911896517u, 1697006473u, 1145487066u, 1605663299u, |
3399 | 3053606724u, |
3400 | 2386289465u, |
3401 | 3821211369u, 1006215345u, 1256304829u, 1053001668u, |
3402 | 1289194958u, 118761054u, 1853688730u, 2803418011u, |
3403 | 188650809u, |
3404 | 3763686458u, |
3405 | 1006829556u, 2961984133u, 3390525025u, 2061199893u, |
3406 | 141792681u, 2439893463u, 2652982650u, 1804942682u, |
3407 | 1546510005u, |
3408 | 1246961405u, |
3409 | 2407577046u, 565772575u, 3751844810u, 2943166103u, |
3410 | 3750052451u, 3022527280u, 25162928u, 397381043u, |
3411 | 1818337632u, |
3412 | 3447363730u, |
3413 | 3936437150u, 2569420703u, 2215592390u, 2171555672u, |
3414 | 3665571006u, 4021712412u, 2939158353u, 4057813172u, |
3415 | 1823237318u, |
3416 | 103999245u, |
3417 | 3251978010u, 3591914940u, 3582495283u, 2519035265u, |
3418 | 3905726135u, 3180393349u, 2743117123u, 55247368u, |
3419 | 3325286701u, |
3420 | 705195946u, |
3421 | 1857526853u, 1480518550u, 3809990433u, 1398189338u, |
3422 | 3126362926u, 3959531492u, 1503658285u, 1977847740u, |
3423 | 3043964489u, |
3424 | 2613086143u, |
3425 | 1518119282u, 4238434900u, 3905746486u, 3064949667u, |
3426 | 1028122931u, 3309119457u, 4071194920u, 3096098907u, |
3427 | 4137180520u, |
3428 | 494467959u, |
3429 | 1231408687u, 1691606157u, 1793452569u, 2722196118u, |
3430 | 3478603952u, 1059665738u, 2282032278u, 3990268388u, |
3431 | 1719514651u, |
3432 | 4248311578u, |
3433 | 3799146721u, 898026304u, 3367808954u, 4162472815u, |
3434 | 170495870u, 1308116609u, 3428285344u, 1714716475u, |
3435 | 395576794u, |
3436 | 4153638621u, |
3437 | 2999745812u, 3483315953u, 304980828u, 595337120u, |
3438 | 3486516729u, 2331563143u, 2583609459u, 1885928417u, |
3439 | 3834283777u, |
3440 | 979337825u, |
3441 | 932057378u, 3124081189u, 1930356777u, 3865887996u, |
3442 | 4178282217u, 4214219408u, 3669465884u, 1472413856u, |
3443 | 3356866587u, |
3444 | 1012769806u, |
3445 | 3043639963u, 996996396u, 207308216u, 982967331u, |
3446 | 2991319933u, 318066902u, 721489670u, 1249967713u, |
3447 | 749240921u, |
3448 | 591392325u, |
3449 | 2379365192u, 2250868849u, 2163259329u, 143191325u, |
3450 | 3778285606u, 982149096u, 3536906200u, 2244353244u, |
3451 | 1443862317u, |
3452 | 3161549210u, |
3453 | 2183127464u, 2015409516u, 547003700u, 2032484282u, |
3454 | 523677821u, 4275663308u, 3827205526u, 3903778273u, |
3455 | 2444530525u, |
3456 | 2543645801u, |
3457 | 1173958423u, 784740616u, 2878693675u, 3127696736u, |
3458 | 3832037316u, 3161002398u, 4084166400u, 4213346853u, |
3459 | 223390424u, |
3460 | 4273380883u, |
3461 | 2130315482u, 3429606032u, 3367732613u, 1912357694u, |
3462 | 422632590u, 1266957023u, 3437535648u, 736404240u, |
3463 | 2281709372u, |
3464 | 415859912u, |
3465 | 212948797u, 351612650u, 3920561440u, 112963586u, |
3466 | 2230727543u, 2851076612u, 1990662634u, 2264296857u, |
3467 | 3131463650u, |
3468 | 2704034623u, |
3469 | 3541637839u, 2954232792u, 533986918u, 4158757533u, |
3470 | 65174248u, 4232639593u, 865906667u, 1948225652u, |
3471 | 779656112u, |
3472 | 3873989249u, |
3473 | 2372984749u, 2346988193u, 1104345713u, 1165654138u, |
3474 | 4045762610u, 3588205178u, 461363991u, 1111215752u, |
3475 | 1389675192u, |
3476 | 2404325151u, |
3477 | 2152228101u, 3808973622u, 1901235912u, 3458690696u, |
3478 | 314513238u, 2539459143u, 2847998873u, 952026138u, |
3479 | 2325705328u, |
3480 | 407844712u, |
3481 | 3727960715u, 2996448351u, 2374336760u, 3138756390u, |
3482 | 2600015243u, 539980418u, 1876285352u, 1670330799u, |
3483 | 1709360377u, |
3484 | 2868531654u, |
3485 | 494777964u, 2773053597u, 599486162u, 3962209577u, |
3486 | 1871328846u, 2171933018u, 110279472u, 384074780u, |
3487 | 4147021936u, |
3488 | 2333589647u, |
3489 | 4251778066u, 40493468u, 3099342316u, 4108779767u, |
3490 | 2812424588u, 954542332u, 2040682331u, 2251152306u, |
3491 | 45915516u, |
3492 | 259525626u, |
3493 | 1045384743u, 4134656562u, 749389261u, 874399445u, |
3494 | 616549904u, 2200447504u, 436024539u, 78972290u, |
3495 | 3210485762u, |
3496 | 1907985531u, |
3497 | 3013721395u, 4214533685u, 4198804243u, 534879265u, |
3498 | 1517190881u, 3756787754u, 1152563554u, 1718750948u, |
3499 | 777737463u, |
3500 | 1402478860u, |
3501 | 1824562784u, 1879401449u, 3515818786u, 513165201u, |
3502 | 1423491227u, 2103067918u, 2291777410u, 1097943000u, |
3503 | }; |
3504 | |
3505 | // Return false only if offset is -1 and a spot check of 3 hashes all yield 0. |
3506 | bool Test(int offset, int len = 0) { |
3507 | #undef Check |
3508 | #undef IsAlive |
3509 | |
3510 | #define Check(x) do { \ |
3511 | const uint32_t actual = (x), e = expected[index++]; \ |
3512 | bool ok = actual == e; \ |
3513 | if (!ok) { \ |
3514 | cerr << "expected " << hex << e << " but got " << actual << endl; \ |
3515 | ++errors; \ |
3516 | } \ |
3517 | assert(ok); \ |
3518 | } while (0) |
3519 | |
3520 | #define IsAlive(x) do { alive += IsNonZero(x); } while (0) |
3521 | |
3522 | // After the following line is where the uses of "Check" and such will go. |
3523 | static int index = 0; |
3524 | if (offset == -1) { int alive = 0; IsAlive(farmhashcc::Hash32WithSeed(data, len++, SEED)); IsAlive(farmhashcc::Hash32(data, len++)); { uint128_t u = farmhashcc::Fingerprint128(data, len++); uint64_t h = Uint128Low64(u); IsAlive(h >> 32); IsAlive((h << 32) >> 32); h = Uint128High64(u); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } len -= 3; return alive > 0; } |
3525 | Check(farmhashcc::Hash32WithSeed(data + offset, len, SEED)); |
3526 | Check(farmhashcc::Hash32(data + offset, len)); |
3527 | { uint128_t u = farmhashcc::Fingerprint128(data + offset, len); uint64_t h = Uint128Low64(u); Check(h >> 32); Check((h << 32) >> 32); h = Uint128High64(u); Check(h >> 32); Check((h << 32) >> 32); } |
3528 | { uint128_t u = farmhashcc::CityHash128WithSeed(data + offset, len, Uint128(SEED0, SEED1)); uint64_t h = Uint128Low64(u); Check(h >> 32); Check((h << 32) >> 32); h = Uint128High64(u); Check(h >> 32); Check((h << 32) >> 32); } |
3529 | |
3530 | return true; |
3531 | #undef Check |
3532 | #undef IsAlive |
3533 | } |
3534 | |
3535 | int RunTest() { |
3536 | Setup(); |
3537 | int i = 0; |
3538 | cout << "Running farmhashccTest" ; |
3539 | if (!Test(-1)) { |
3540 | cout << "... Unavailable\n" ; |
3541 | return NoteErrors(); |
3542 | } |
3543 | // Good. The function is attempting to hash, so run the full test. |
3544 | int errors_prior_to_test = errors; |
3545 | for ( ; i < kTestSize - 1; i++) { |
3546 | Test(i * i, i); |
3547 | } |
3548 | for ( ; i < kDataSize; i += i / 7) { |
3549 | Test(0, i); |
3550 | } |
3551 | Test(0, kDataSize); |
3552 | cout << (errors == errors_prior_to_test ? "... OK\n" : "... Failed\n" ); |
3553 | return NoteErrors(); |
3554 | } |
3555 | |
3556 | #else |
3557 | |
3558 | // After the following line is where the code to print hash codes will go. |
3559 | void Dump(int offset, int len) { |
3560 | cout << farmhashcc::Hash32WithSeed(data + offset, len, SEED) << "u," << endl; |
3561 | cout << farmhashcc::Hash32(data + offset, len) << "u," << endl; |
3562 | { uint128_t u = farmhashcc::Fingerprint128(data + offset, len); uint64_t h = Uint128Low64(u); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u, " ; h = Uint128High64(u); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
3563 | { uint128_t u = farmhashcc::CityHash128WithSeed(data + offset, len, Uint128(SEED0, SEED1)); uint64_t h = Uint128Low64(u); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u, " ; h = Uint128High64(u); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
3564 | } |
3565 | |
3566 | #endif |
3567 | |
3568 | #undef SEED |
3569 | #undef SEED1 |
3570 | #undef SEED0 |
3571 | |
3572 | } // namespace farmhashccTest |
3573 | |
3574 | #if TESTING |
3575 | |
3576 | static int farmhashccTestResult = farmhashccTest::RunTest(); |
3577 | |
3578 | #else |
3579 | int main(int argc, char** argv) { |
3580 | Setup(); |
3581 | cout << "uint32_t expected[] = {\n" ; |
3582 | int i = 0; |
3583 | for ( ; i < kTestSize - 1; i++) { |
3584 | farmhashccTest::Dump(i * i, i); |
3585 | } |
3586 | for ( ; i < kDataSize; i += i / 7) { |
3587 | farmhashccTest::Dump(0, i); |
3588 | } |
3589 | farmhashccTest::Dump(0, kDataSize); |
3590 | cout << "};\n" ; |
3591 | } |
3592 | #endif |
3593 | #ifndef FARMHASH_SELF_TEST_GUARD |
3594 | #define FARMHASH_SELF_TEST_GUARD |
3595 | #include <cstdio> |
3596 | #include <iostream> |
3597 | #include <string.h> |
3598 | |
3599 | using std::cout; |
3600 | using std::cerr; |
3601 | using std::endl; |
3602 | using std::hex; |
3603 | |
3604 | static const uint64_t kSeed0 = 1234567; |
3605 | static const uint64_t kSeed1 = k0; |
3606 | static const int kDataSize = 1 << 20; |
3607 | static const int kTestSize = 300; |
3608 | #define kSeed128 Uint128(kSeed0, kSeed1) |
3609 | |
3610 | static char data[kDataSize]; |
3611 | |
3612 | static int completed_self_tests = 0; |
3613 | static int errors = 0; |
3614 | |
3615 | // Initialize data to pseudorandom values. |
3616 | void Setup() { |
3617 | if (completed_self_tests == 0) { |
3618 | uint64_t a = 9; |
3619 | uint64_t b = 777; |
3620 | for (int i = 0; i < kDataSize; i++) { |
3621 | a += b; |
3622 | b += a; |
3623 | a = (a ^ (a >> 41)) * k0; |
3624 | b = (b ^ (b >> 41)) * k0 + i; |
3625 | uint8_t u = b >> 37; |
3626 | memcpy(data + i, &u, 1); // uint8_t -> char |
3627 | } |
3628 | } |
3629 | } |
3630 | |
3631 | int NoteErrors() { |
3632 | #define NUM_SELF_TESTS 9 |
3633 | if (++completed_self_tests == NUM_SELF_TESTS) |
3634 | std::exit(errors > 0); |
3635 | return errors; |
3636 | } |
3637 | |
3638 | template <typename T> inline bool IsNonZero(T x) { |
3639 | return x != 0; |
3640 | } |
3641 | |
3642 | template <> inline bool IsNonZero<uint128_t>(uint128_t x) { |
3643 | return x != Uint128(0, 0); |
3644 | } |
3645 | |
3646 | #endif // FARMHASH_SELF_TEST_GUARD |
3647 | |
3648 | namespace farmhashmkTest { |
3649 | |
3650 | uint32_t CreateSeed(int offset, int salt) { |
3651 | uint32_t h = static_cast<uint32_t>(salt & 0xffffffff); |
3652 | h = h * c1; |
3653 | h ^= (h >> 17); |
3654 | h = h * c1; |
3655 | h ^= (h >> 17); |
3656 | h = h * c1; |
3657 | h ^= (h >> 17); |
3658 | h += static_cast<uint32_t>(offset & 0xffffffff); |
3659 | h = h * c1; |
3660 | h ^= (h >> 17); |
3661 | h = h * c1; |
3662 | h ^= (h >> 17); |
3663 | h = h * c1; |
3664 | h ^= (h >> 17); |
3665 | return h; |
3666 | } |
3667 | |
3668 | #undef SEED |
3669 | #undef SEED1 |
3670 | #undef SEED0 |
3671 | #define SEED CreateSeed(offset, -1) |
3672 | #define SEED0 CreateSeed(offset, 0) |
3673 | #define SEED1 CreateSeed(offset, 1) |
3674 | |
3675 | #undef TESTING |
3676 | #define TESTING 1 |
3677 | #if TESTING |
3678 | uint32_t expected[] = { |
3679 | 4223616069u, |
3680 | 3696677242u, |
3681 | 4081014168u, |
3682 | 2576519988u, |
3683 | 2212771159u, |
3684 | 1112731063u, |
3685 | 1020067935u, |
3686 | 3955445564u, |
3687 | 1451961420u, |
3688 | 653440099u, |
3689 | 31917516u, |
3690 | 2957164615u, |
3691 | 2590087362u, |
3692 | 3879448744u, |
3693 | 176305566u, |
3694 | 2447367541u, |
3695 | 1359016305u, |
3696 | 3363804638u, |
3697 | 1117290165u, |
3698 | 1062549743u, |
3699 | 2437877004u, |
3700 | 1894455839u, |
3701 | 673206794u, |
3702 | 3486923651u, |
3703 | 3269862919u, |
3704 | 2303349487u, |
3705 | 1380660650u, |
3706 | 595525107u, |
3707 | 1525325287u, |
3708 | 2025609358u, |
3709 | 176408838u, |
3710 | 1592885012u, |
3711 | 864896482u, |
3712 | 2101378090u, |
3713 | 3489229104u, |
3714 | 2118965695u, |
3715 | 581644891u, |
3716 | 2718789079u, |
3717 | 631613207u, |
3718 | 4228658372u, |
3719 | 3867875546u, |
3720 | 3531368319u, |
3721 | 3804516756u, |
3722 | 3317755099u, |
3723 | 1619744564u, |
3724 | 2884717286u, |
3725 | 1088213445u, |
3726 | 2667691076u, |
3727 | 3727873235u, |
3728 | 2330406762u, |
3729 | 3616470388u, |
3730 | 967660719u, |
3731 | 4148162586u, |
3732 | 315219121u, |
3733 | 673084328u, |
3734 | 3047602355u, |
3735 | 1598963653u, |
3736 | 1267826661u, |
3737 | 2117362589u, |
3738 | 2861192253u, |
3739 | 1823625377u, |
3740 | 1380350078u, |
3741 | 1641748342u, |
3742 | 1176094482u, |
3743 | 269384321u, |
3744 | 2178982315u, |
3745 | 3480237248u, |
3746 | 2660755208u, |
3747 | 1850544433u, |
3748 | 3429699438u, |
3749 | 1262819303u, |
3750 | 640556464u, |
3751 | 2421125401u, |
3752 | 2188368608u, |
3753 | 2612932825u, |
3754 | 1474432581u, |
3755 | 173790449u, |
3756 | 2124882189u, |
3757 | 831272654u, |
3758 | 622960146u, |
3759 | 4238751051u, |
3760 | 3250317967u, |
3761 | 2120810248u, |
3762 | 1948231495u, |
3763 | 1389029321u, |
3764 | 2200398357u, |
3765 | 2134232963u, |
3766 | 2948072329u, |
3767 | 617717625u, |
3768 | 681164587u, |
3769 | 114859387u, |
3770 | 430545646u, |
3771 | 57239089u, |
3772 | 3163338012u, |
3773 | 3482496399u, |
3774 | 557662576u, |
3775 | 1102441413u, |
3776 | 2670159360u, |
3777 | 991116729u, |
3778 | 846014240u, |
3779 | 4233741566u, |
3780 | 1802317242u, |
3781 | 3129528802u, |
3782 | 1459456375u, |
3783 | 1305643039u, |
3784 | 3258671612u, |
3785 | 1578285833u, |
3786 | 868590079u, |
3787 | 1631034517u, |
3788 | 1695432937u, |
3789 | 561078856u, |
3790 | 1004115553u, |
3791 | 3086090507u, |
3792 | 3818348650u, |
3793 | 731596645u, |
3794 | 780926790u, |
3795 | 2544205955u, |
3796 | 158479164u, |
3797 | 3983514188u, |
3798 | 2004735250u, |
3799 | 3436218400u, |
3800 | 673684751u, |
3801 | 1463431419u, |
3802 | 2880490219u, |
3803 | 3223748024u, |
3804 | 2218318859u, |
3805 | 1474466194u, |
3806 | 2636437533u, |
3807 | 2206794961u, |
3808 | 140995728u, |
3809 | 1186394086u, |
3810 | 1805716888u, |
3811 | 1640037724u, |
3812 | 3942729099u, |
3813 | 1944727013u, |
3814 | 918951560u, |
3815 | 498666871u, |
3816 | 3486974657u, |
3817 | 2967205462u, |
3818 | 1167253804u, |
3819 | 1884281041u, |
3820 | 2866015002u, |
3821 | 4158319270u, |
3822 | 2627220079u, |
3823 | 3733319624u, |
3824 | 3317092271u, |
3825 | 438323662u, |
3826 | 3195868065u, |
3827 | 3426606709u, |
3828 | 360708338u, |
3829 | 1905491012u, |
3830 | 650004803u, |
3831 | 1351266252u, |
3832 | 3133279000u, |
3833 | 3722811115u, |
3834 | 2722412434u, |
3835 | 918432408u, |
3836 | 3678271248u, |
3837 | 269599647u, |
3838 | 621514057u, |
3839 | 3117077855u, |
3840 | 1545425390u, |
3841 | 2597567410u, |
3842 | 1221437820u, |
3843 | 3493254589u, |
3844 | 102787342u, |
3845 | 918861168u, |
3846 | 348795089u, |
3847 | 3439883229u, |
3848 | 2353641807u, |
3849 | 2209585469u, |
3850 | 4035884492u, |
3851 | 2686995435u, |
3852 | 1649888022u, |
3853 | 3852893848u, |
3854 | 3042700028u, |
3855 | 314103172u, |
3856 | 726977769u, |
3857 | 2489830276u, |
3858 | 2872753660u, |
3859 | 1316214989u, |
3860 | 1488801501u, |
3861 | 1811420390u, |
3862 | 639581627u, |
3863 | 2362837215u, |
3864 | 3634581834u, |
3865 | 3648576802u, |
3866 | 1257314182u, |
3867 | 762118371u, |
3868 | 4268447045u, |
3869 | 730167096u, |
3870 | 755561509u, |
3871 | 882614845u, |
3872 | 3696972894u, |
3873 | 228263661u, |
3874 | 1478636142u, |
3875 | 2767751651u, |
3876 | 1532617116u, |
3877 | 3838657661u, |
3878 | 1944359935u, |
3879 | 1401102137u, |
3880 | 3772933173u, |
3881 | 1050098254u, |
3882 | 1658079354u, |
3883 | 1846025728u, |
3884 | 2204244794u, |
3885 | 2017217424u, |
3886 | 1275162853u, |
3887 | 1429816745u, |
3888 | 2175565479u, |
3889 | 1716109139u, |
3890 | 1187506761u, |
3891 | 2434641075u, |
3892 | 2725597783u, |
3893 | 1795687662u, |
3894 | 1393312782u, |
3895 | 3511565397u, |
3896 | 627885430u, |
3897 | 4145733164u, |
3898 | 2519005353u, |
3899 | 231414775u, |
3900 | 1242015635u, |
3901 | 2760723497u, |
3902 | 2185540568u, |
3903 | 727314436u, |
3904 | 2358790354u, |
3905 | 1186393454u, |
3906 | 4234795645u, |
3907 | 350567813u, |
3908 | 866773875u, |
3909 | 3145590392u, |
3910 | 1158374055u, |
3911 | 3903123687u, |
3912 | 1862119793u, |
3913 | 2204587556u, |
3914 | 4266276976u, |
3915 | 4151548555u, |
3916 | 915250402u, |
3917 | 2874695320u, |
3918 | 2360311410u, |
3919 | 1099212769u, |
3920 | 1271542714u, |
3921 | 3473148363u, |
3922 | 1637325418u, |
3923 | 1807795989u, |
3924 | 2493819794u, |
3925 | 3800917924u, |
3926 | 4001205856u, |
3927 | 2582153621u, |
3928 | 3365872040u, |
3929 | 2890146216u, |
3930 | 2626363824u, |
3931 | 3133351295u, |
3932 | 4046827296u, |
3933 | 3053118771u, |
3934 | 4113026751u, |
3935 | 884356716u, |
3936 | 3828347401u, |
3937 | 10608262u, |
3938 | 830987972u, |
3939 | 1841080500u, |
3940 | 3202717763u, |
3941 | 3561778749u, |
3942 | 1906000052u, |
3943 | 3058284660u, |
3944 | 1432904514u, |
3945 | 2567431677u, |
3946 | 2550162530u, |
3947 | 665557986u, |
3948 | 936887821u, |
3949 | 2101205308u, |
3950 | 4253535847u, |
3951 | 1662043545u, |
3952 | 1253611611u, |
3953 | 2091370094u, |
3954 | 2635077370u, |
3955 | 2602176041u, |
3956 | 3624115809u, |
3957 | 748442714u, |
3958 | 2709749154u, |
3959 | 1023493343u, |
3960 | 860291012u, |
3961 | 3924715584u, |
3962 | 1536436740u, |
3963 | 2551145800u, |
3964 | 2391782865u, |
3965 | 1467705048u, |
3966 | 2583909796u, |
3967 | 3616666170u, |
3968 | 1162857372u, |
3969 | 4228631071u, |
3970 | 1510132376u, |
3971 | 2739165009u, |
3972 | 2656606142u, |
3973 | 3454996358u, |
3974 | 3155038853u, |
3975 | 1022087316u, |
3976 | 100044110u, |
3977 | 494208296u, |
3978 | 2746186477u, |
3979 | 4216782431u, |
3980 | 225448834u, |
3981 | 3728320521u, |
3982 | 335282866u, |
3983 | 3148194874u, |
3984 | 953503703u, |
3985 | 1293353960u, |
3986 | 202372387u, |
3987 | 1326119870u, |
3988 | 4045123735u, |
3989 | 3819994846u, |
3990 | 1629004186u, |
3991 | 1081099186u, |
3992 | 3591584153u, |
3993 | 1670825804u, |
3994 | 3404257979u, |
3995 | 3262192301u, |
3996 | 2572846095u, |
3997 | 3714992543u, |
3998 | 4264142572u, |
3999 | 529616678u, |
4000 | 2882154574u, |
4001 | 3006354178u, |
4002 | 3865969421u, |
4003 | 2007174907u, |
4004 | 308283107u, |
4005 | 2629833703u, |
4006 | 3159124075u, |
4007 | 1146492131u, |
4008 | 494104332u, |
4009 | 493149727u, |
4010 | 1342910585u, |
4011 | 521642387u, |
4012 | 2201695937u, |
4013 | 2517980959u, |
4014 | 2426821287u, |
4015 | 777374655u, |
4016 | 2228189792u, |
4017 | 4027055486u, |
4018 | 228976000u, |
4019 | 3842083468u, |
4020 | 1723920223u, |
4021 | 1192126094u, |
4022 | 787744493u, |
4023 | 2740368380u, |
4024 | 2284153001u, |
4025 | 2773829458u, |
4026 | 442000614u, |
4027 | 387830783u, |
4028 | 2169780670u, |
4029 | 2253144627u, |
4030 | 3532502484u, |
4031 | 1969684059u, |
4032 | 1165351416u, |
4033 | 3055056536u, |
4034 | 3582324253u, |
4035 | 231419363u, |
4036 | 770979865u, |
4037 | 3213983597u, |
4038 | 3690452836u, |
4039 | 935794639u, |
4040 | 3230602762u, |
4041 | 2841762457u, |
4042 | 407598927u, |
4043 | 1164479891u, |
4044 | 3721799696u, |
4045 | 354738136u, |
4046 | 1801566618u, |
4047 | 3206038542u, |
4048 | 2621379981u, |
4049 | 1943487262u, |
4050 | 3534745636u, |
4051 | 1074424589u, |
4052 | 1304517521u, |
4053 | 4133400969u, |
4054 | 2339317978u, |
4055 | 2135116860u, |
4056 | 4180643791u, |
4057 | 2415309340u, |
4058 | 1855926417u, |
4059 | 3418648630u, |
4060 | 1968113037u, |
4061 | 597304222u, |
4062 | 3668824865u, |
4063 | 3810008716u, |
4064 | 3014702569u, |
4065 | 3151212026u, |
4066 | 156057449u, |
4067 | 373134533u, |
4068 | 2068234004u, |
4069 | 191580563u, |
4070 | 3832754488u, |
4071 | 2924104199u, |
4072 | 2026044494u, |
4073 | 4065780435u, |
4074 | 122565840u, |
4075 | 4194985167u, |
4076 | 2744823717u, |
4077 | 2494098735u, |
4078 | 3753793370u, |
4079 | 1885739217u, |
4080 | 2488161225u, |
4081 | 3643797615u, |
4082 | 2653367310u, |
4083 | 2494061477u, |
4084 | 189968132u, |
4085 | 899646597u, |
4086 | 392100396u, |
4087 | 4012318310u, |
4088 | 3855777086u, |
4089 | 3566860954u, |
4090 | 2698574996u, |
4091 | 2414249905u, |
4092 | 1330623339u, |
4093 | 1263222732u, |
4094 | 1277741760u, |
4095 | 2194959402u, |
4096 | 1629656136u, |
4097 | 120494320u, |
4098 | 1072368005u, |
4099 | 1084245077u, |
4100 | 4011372748u, |
4101 | 1366613353u, |
4102 | 3108643228u, |
4103 | 3332219532u, |
4104 | 2114746095u, |
4105 | 3964007334u, |
4106 | 371687128u, |
4107 | 1084813876u, |
4108 | 126459896u, |
4109 | 4292782331u, |
4110 | 321283184u, |
4111 | 398168499u, |
4112 | 3604983506u, |
4113 | 560701543u, |
4114 | 2073961354u, |
4115 | 4240841868u, |
4116 | 4151211362u, |
4117 | 1338986875u, |
4118 | 4093476832u, |
4119 | 2269279497u, |
4120 | 3500846299u, |
4121 | 2510225147u, |
4122 | 598000444u, |
4123 | 1330391422u, |
4124 | 1432533385u, |
4125 | 4171226231u, |
4126 | 426821154u, |
4127 | 2932270996u, |
4128 | 3378981077u, |
4129 | 2217871549u, |
4130 | 1619647984u, |
4131 | 4051608043u, |
4132 | 3180237819u, |
4133 | 12919578u, |
4134 | 1375401767u, |
4135 | 371320427u, |
4136 | 2986640571u, |
4137 | 2336669859u, |
4138 | 3796464715u, |
4139 | 1892383284u, |
4140 | 306814912u, |
4141 | 2125823211u, |
4142 | 1863678891u, |
4143 | 3249703818u, |
4144 | 3840225752u, |
4145 | 281579900u, |
4146 | 264680257u, |
4147 | 4266359110u, |
4148 | 4182229890u, |
4149 | 2239659703u, |
4150 | 3627947372u, |
4151 | 2373929191u, |
4152 | 224082765u, |
4153 | 4053639058u, |
4154 | 1862360303u, |
4155 | 3187739624u, |
4156 | 3392706679u, |
4157 | 948039509u, |
4158 | 817505760u, |
4159 | 1215842393u, |
4160 | 3462222651u, |
4161 | 536021853u, |
4162 | 182346832u, |
4163 | 2731944883u, |
4164 | 2346674384u, |
4165 | 2640961678u, |
4166 | 3446695687u, |
4167 | 2271722179u, |
4168 | 1301069656u, |
4169 | 2803881468u, |
4170 | 2832614405u, |
4171 | 1691544398u, |
4172 | 698756814u, |
4173 | 3980620906u, |
4174 | 3565421410u, |
4175 | 754769376u, |
4176 | 4115923404u, |
4177 | 3909962218u, |
4178 | 2747614077u, |
4179 | 2888289845u, |
4180 | 1016920862u, |
4181 | 2790946178u, |
4182 | 3067070960u, |
4183 | 3173251481u, |
4184 | 1572132982u, |
4185 | 255048203u, |
4186 | 2996538818u, |
4187 | 3405398987u, |
4188 | 136106013u, |
4189 | 3581605228u, |
4190 | 4277437977u, |
4191 | 2147300534u, |
4192 | 3728426265u, |
4193 | 3483629996u, |
4194 | 1478452694u, |
4195 | 20756076u, |
4196 | 2774992067u, |
4197 | 432987927u, |
4198 | 1516771026u, |
4199 | 3511588664u, |
4200 | 2130994978u, |
4201 | 509385406u, |
4202 | 873090347u, |
4203 | 2163904107u, |
4204 | 4192239086u, |
4205 | 2532489989u, |
4206 | 1090772651u, |
4207 | 3910797408u, |
4208 | 3710882132u, |
4209 | 155010959u, |
4210 | 1369823531u, |
4211 | 1599664937u, |
4212 | 4035593587u, |
4213 | 1212746925u, |
4214 | 795822552u, |
4215 | 116689518u, |
4216 | 3674240941u, |
4217 | 1135576664u, |
4218 | 756750261u, |
4219 | 1027431362u, |
4220 | 390555140u, |
4221 | 2228460216u, |
4222 | 1506940482u, |
4223 | 3733857700u, |
4224 | 3048762971u, |
4225 | 2511703196u, |
4226 | 548609887u, |
4227 | 1607354252u, |
4228 | 659053982u, |
4229 | 259884450u, |
4230 | 1793130460u, |
4231 | 4083364495u, |
4232 | 3148555881u, |
4233 | 1764350138u, |
4234 | 2436485683u, |
4235 | 4031563025u, |
4236 | 3261860724u, |
4237 | 2475833430u, |
4238 | 2101726086u, |
4239 | 3191176464u, |
4240 | 2646658847u, |
4241 | 2127042126u, |
4242 | 771316100u, |
4243 | 2115922959u, |
4244 | 3208515045u, |
4245 | 2355437783u, |
4246 | 3621147793u, |
4247 | 1580163615u, |
4248 | 3211555675u, |
4249 | 3299188490u, |
4250 | 191613920u, |
4251 | 466733956u, |
4252 | 2939029038u, |
4253 | 1509152039u, |
4254 | 130591314u, |
4255 | 1892874677u, |
4256 | 1646908044u, |
4257 | 3452406523u, |
4258 | 3998376606u, |
4259 | 1199243832u, |
4260 | 2187108812u, |
4261 | 3189230066u, |
4262 | 4161151481u, |
4263 | 3371454980u, |
4264 | 3681788646u, |
4265 | 180842187u, |
4266 | 3685022399u, |
4267 | 3058749895u, |
4268 | 3250165163u, |
4269 | 2895367943u, |
4270 | 2627101723u, |
4271 | 771755098u, |
4272 | 1332921024u, |
4273 | 3638871848u, |
4274 | 514215135u, |
4275 | 3591227378u, |
4276 | 2300310870u, |
4277 | 3689533503u, |
4278 | 851607114u, |
4279 | 114330368u, |
4280 | 2709027386u, |
4281 | 1743034877u, |
4282 | 1013693860u, |
4283 | 288169008u, |
4284 | 3545190686u, |
4285 | 1052165084u, |
4286 | 3995862307u, |
4287 | 96902755u, |
4288 | 1097819851u, |
4289 | 2645431442u, |
4290 | 2184148618u, |
4291 | 2151206566u, |
4292 | 350979797u, |
4293 | 3467920900u, |
4294 | 421116779u, |
4295 | 1246252u, |
4296 | 4057835428u, |
4297 | 329324407u, |
4298 | 4104482417u, |
4299 | 844624570u, |
4300 | 3306265806u, |
4301 | 3787625025u, |
4302 | 4263241191u, |
4303 | 3251413927u, |
4304 | 2921204431u, |
4305 | 2931915325u, |
4306 | 992134330u, |
4307 | 3986338354u, |
4308 | 1327895216u, |
4309 | 1458363596u, |
4310 | 1480608532u, |
4311 | 728594368u, |
4312 | 3804366693u, |
4313 | 794404223u, |
4314 | 1643240863u, |
4315 | 793417255u, |
4316 | 4167916443u, |
4317 | 2683488959u, |
4318 | 3124925324u, |
4319 | 4184843652u, |
4320 | 3750971752u, |
4321 | 308509829u, |
4322 | 1054550805u, |
4323 | 2797511972u, |
4324 | 4043123412u, |
4325 | 1587158240u, |
4326 | 4050518606u, |
4327 | 3030062190u, |
4328 | 2589912753u, |
4329 | 603440067u, |
4330 | 937013191u, |
4331 | 1071662315u, |
4332 | 2100661456u, |
4333 | 2602005741u, |
4334 | 435516078u, |
4335 | 2260470147u, |
4336 | 1256268350u, |
4337 | 3612035u, |
4338 | 3368856141u, |
4339 | 151516099u, |
4340 | 3081868591u, |
4341 | 3363755681u, |
4342 | 2049963149u, |
4343 | 2885320434u, |
4344 | 84682005u, |
4345 | 2411758308u, |
4346 | 2695174275u, |
4347 | 3099904644u, |
4348 | 1787308684u, |
4349 | 1132379308u, |
4350 | 564634346u, |
4351 | 510236510u, |
4352 | 2804443681u, |
4353 | 3931864252u, |
4354 | 2064427949u, |
4355 | 1893979229u, |
4356 | 2916544974u, |
4357 | 1885887717u, |
4358 | 2978018250u, |
4359 | 494192125u, |
4360 | 2642662373u, |
4361 | 901112508u, |
4362 | 636035003u, |
4363 | 1658643797u, |
4364 | 172746975u, |
4365 | 517504890u, |
4366 | 3440019372u, |
4367 | 4144498044u, |
4368 | 1854755456u, |
4369 | 3672653905u, |
4370 | 4176892856u, |
4371 | 382159097u, |
4372 | 282871690u, |
4373 | 3629300472u, |
4374 | 2500754041u, |
4375 | 1677659759u, |
4376 | 1067175061u, |
4377 | 161654075u, |
4378 | 1672575536u, |
4379 | 346120493u, |
4380 | 2730229631u, |
4381 | 203466442u, |
4382 | 1244549529u, |
4383 | 199761971u, |
4384 | 2744895408u, |
4385 | 3195315331u, |
4386 | 2124618519u, |
4387 | 3261045496u, |
4388 | 985339699u, |
4389 | 3385585455u, |
4390 | 1545740710u, |
4391 | 3636652160u, |
4392 | 2167020081u, |
4393 | 1207897204u, |
4394 | 28752417u, |
4395 | 2895834146u, |
4396 | 3640845375u, |
4397 | 3750293073u, |
4398 | 548997850u, |
4399 | 4207814196u, |
4400 | 4183030708u, |
4401 | 2462810989u, |
4402 | 3929965401u, |
4403 | }; |
4404 | |
4405 | // Return false only if offset is -1 and a spot check of 3 hashes all yield 0. |
4406 | bool Test(int offset, int len = 0) { |
4407 | #undef Check |
4408 | #undef IsAlive |
4409 | |
4410 | #define Check(x) do { \ |
4411 | const uint32_t actual = (x), e = expected[index++]; \ |
4412 | bool ok = actual == e; \ |
4413 | if (!ok) { \ |
4414 | cerr << "expected " << hex << e << " but got " << actual << endl; \ |
4415 | ++errors; \ |
4416 | } \ |
4417 | assert(ok); \ |
4418 | } while (0) |
4419 | |
4420 | #define IsAlive(x) do { alive += IsNonZero(x); } while (0) |
4421 | |
4422 | // After the following line is where the uses of "Check" and such will go. |
4423 | static int index = 0; |
4424 | if (offset == -1) { int alive = 0; IsAlive(farmhashmk::Hash32WithSeed(data, len++, SEED)); IsAlive(farmhashmk::Hash32(data, len++)); IsAlive(farmhashmk::Hash32(data, len++)); len -= 3; return alive > 0; } |
4425 | Check(farmhashmk::Hash32WithSeed(data + offset, len, SEED)); |
4426 | Check(farmhashmk::Hash32(data + offset, len)); |
4427 | |
4428 | return true; |
4429 | #undef Check |
4430 | #undef IsAlive |
4431 | } |
4432 | |
4433 | int RunTest() { |
4434 | Setup(); |
4435 | int i = 0; |
4436 | cout << "Running farmhashmkTest" ; |
4437 | if (!Test(-1)) { |
4438 | cout << "... Unavailable\n" ; |
4439 | return NoteErrors(); |
4440 | } |
4441 | // Good. The function is attempting to hash, so run the full test. |
4442 | int errors_prior_to_test = errors; |
4443 | for ( ; i < kTestSize - 1; i++) { |
4444 | Test(i * i, i); |
4445 | } |
4446 | for ( ; i < kDataSize; i += i / 7) { |
4447 | Test(0, i); |
4448 | } |
4449 | Test(0, kDataSize); |
4450 | cout << (errors == errors_prior_to_test ? "... OK\n" : "... Failed\n" ); |
4451 | return NoteErrors(); |
4452 | } |
4453 | |
4454 | #else |
4455 | |
4456 | // After the following line is where the code to print hash codes will go. |
4457 | void Dump(int offset, int len) { |
4458 | cout << farmhashmk::Hash32WithSeed(data + offset, len, SEED) << "u," << endl; |
4459 | cout << farmhashmk::Hash32(data + offset, len) << "u," << endl; |
4460 | } |
4461 | |
4462 | #endif |
4463 | |
4464 | #undef SEED |
4465 | #undef SEED1 |
4466 | #undef SEED0 |
4467 | |
4468 | } // namespace farmhashmkTest |
4469 | |
4470 | #if TESTING |
4471 | |
4472 | static int farmhashmkTestResult = farmhashmkTest::RunTest(); |
4473 | |
4474 | #else |
4475 | int main(int argc, char** argv) { |
4476 | Setup(); |
4477 | cout << "uint32_t expected[] = {\n" ; |
4478 | int i = 0; |
4479 | for ( ; i < kTestSize - 1; i++) { |
4480 | farmhashmkTest::Dump(i * i, i); |
4481 | } |
4482 | for ( ; i < kDataSize; i += i / 7) { |
4483 | farmhashmkTest::Dump(0, i); |
4484 | } |
4485 | farmhashmkTest::Dump(0, kDataSize); |
4486 | cout << "};\n" ; |
4487 | } |
4488 | #endif |
4489 | #ifndef FARMHASH_SELF_TEST_GUARD |
4490 | #define FARMHASH_SELF_TEST_GUARD |
4491 | #include <cstdio> |
4492 | #include <iostream> |
4493 | #include <string.h> |
4494 | |
4495 | using std::cout; |
4496 | using std::cerr; |
4497 | using std::endl; |
4498 | using std::hex; |
4499 | |
4500 | static const uint64_t kSeed0 = 1234567; |
4501 | static const uint64_t kSeed1 = k0; |
4502 | static const int kDataSize = 1 << 20; |
4503 | static const int kTestSize = 300; |
4504 | #define kSeed128 Uint128(kSeed0, kSeed1) |
4505 | |
4506 | static char data[kDataSize]; |
4507 | |
4508 | static int completed_self_tests = 0; |
4509 | static int errors = 0; |
4510 | |
4511 | // Initialize data to pseudorandom values. |
4512 | void Setup() { |
4513 | if (completed_self_tests == 0) { |
4514 | uint64_t a = 9; |
4515 | uint64_t b = 777; |
4516 | for (int i = 0; i < kDataSize; i++) { |
4517 | a += b; |
4518 | b += a; |
4519 | a = (a ^ (a >> 41)) * k0; |
4520 | b = (b ^ (b >> 41)) * k0 + i; |
4521 | uint8_t u = b >> 37; |
4522 | memcpy(data + i, &u, 1); // uint8_t -> char |
4523 | } |
4524 | } |
4525 | } |
4526 | |
4527 | int NoteErrors() { |
4528 | #define NUM_SELF_TESTS 9 |
4529 | if (++completed_self_tests == NUM_SELF_TESTS) |
4530 | std::exit(errors > 0); |
4531 | return errors; |
4532 | } |
4533 | |
4534 | template <typename T> inline bool IsNonZero(T x) { |
4535 | return x != 0; |
4536 | } |
4537 | |
4538 | template <> inline bool IsNonZero<uint128_t>(uint128_t x) { |
4539 | return x != Uint128(0, 0); |
4540 | } |
4541 | |
4542 | #endif // FARMHASH_SELF_TEST_GUARD |
4543 | |
4544 | namespace farmhashnaTest { |
4545 | |
4546 | uint32_t CreateSeed(int offset, int salt) { |
4547 | uint32_t h = static_cast<uint32_t>(salt & 0xffffffff); |
4548 | h = h * c1; |
4549 | h ^= (h >> 17); |
4550 | h = h * c1; |
4551 | h ^= (h >> 17); |
4552 | h = h * c1; |
4553 | h ^= (h >> 17); |
4554 | h += static_cast<uint32_t>(offset & 0xffffffff); |
4555 | h = h * c1; |
4556 | h ^= (h >> 17); |
4557 | h = h * c1; |
4558 | h ^= (h >> 17); |
4559 | h = h * c1; |
4560 | h ^= (h >> 17); |
4561 | return h; |
4562 | } |
4563 | |
4564 | #undef SEED |
4565 | #undef SEED1 |
4566 | #undef SEED0 |
4567 | #define SEED CreateSeed(offset, -1) |
4568 | #define SEED0 CreateSeed(offset, 0) |
4569 | #define SEED1 CreateSeed(offset, 1) |
4570 | |
4571 | #undef TESTING |
4572 | #define TESTING 1 |
4573 | #if TESTING |
4574 | uint32_t expected[] = { |
4575 | 1140953930u, 861465670u, |
4576 | 3277735313u, 2681724312u, |
4577 | 2598464059u, 797982799u, |
4578 | 890626835u, 800175912u, |
4579 | 2603993599u, 921001710u, |
4580 | 1410420968u, 2134990486u, |
4581 | 3283896453u, 1867689945u, |
4582 | 2914424215u, 2244477846u, |
4583 | 255297188u, 2992121793u, |
4584 | 1110588164u, 4186314283u, |
4585 | 161451183u, 3943596029u, |
4586 | 4019337850u, 452431531u, |
4587 | 283198166u, 2741341286u, |
4588 | 3379021470u, 2557197665u, |
4589 | 299850021u, 2532580744u, |
4590 | 452473466u, 1706958772u, |
4591 | 1298374911u, 3099673830u, |
4592 | 2199864459u, 3696623795u, |
4593 | 236935126u, 2976578695u, |
4594 | 4055299123u, 3281581178u, |
4595 | 1053458494u, 1882212500u, |
4596 | 2305012065u, 2169731866u, |
4597 | 3456121707u, 275903667u, |
4598 | 458884671u, 3033004529u, |
4599 | 3058973506u, 2379411653u, |
4600 | 1898235244u, 1402319660u, |
4601 | 2700149065u, 2699376854u, |
4602 | 147814787u, 720739346u, |
4603 | 2433714046u, 4222949502u, |
4604 | 4220361840u, 1712034059u, |
4605 | 3425469811u, 3690733394u, |
4606 | 4148372108u, 1330324210u, |
4607 | 594028478u, 2921867846u, |
4608 | 1635026870u, 192883107u, |
4609 | 780716741u, 1728752234u, |
4610 | 3280331829u, 326029180u, |
4611 | 3969463346u, 1436364519u, |
4612 | 393215742u, 3349570000u, |
4613 | 3824583307u, 1612122221u, |
4614 | 2859809759u, 3808705738u, |
4615 | 1379537552u, 1646032583u, |
4616 | 2233466664u, 1432476832u, |
4617 | 4023053163u, 2650381482u, |
4618 | 2052294713u, 3552092450u, |
4619 | 1628777059u, 1499109081u, |
4620 | 3476440786u, 3829307897u, |
4621 | 2960536756u, 1554038301u, |
4622 | 1145519619u, 3190844552u, |
4623 | 2902102606u, 3600725550u, |
4624 | 237495366u, 540224401u, |
4625 | 65721842u, 489963606u, |
4626 | 1448662590u, 397635823u, |
4627 | 1596489240u, 1562872448u, |
4628 | 1790705123u, 2128624475u, |
4629 | 180854224u, 2604346966u, |
4630 | 1435705557u, 1262831810u, |
4631 | 155445229u, 1672724608u, |
4632 | 1669465176u, 1341975128u, |
4633 | 663607706u, 2077310004u, |
4634 | 3610042449u, 1911523866u, |
4635 | 1043692997u, 1454396064u, |
4636 | 2563776023u, 294527927u, |
4637 | 1099072299u, 1389770549u, |
4638 | 703505868u, 678706990u, |
4639 | 2952353448u, 2026137563u, |
4640 | 3603803785u, 629449419u, |
4641 | 1933894405u, 3043213226u, |
4642 | 226132789u, 2489287368u, |
4643 | 1552847036u, 645684964u, |
4644 | 3828089804u, 3632594520u, |
4645 | 187883449u, 230403464u, |
4646 | 3151491850u, 3272648435u, |
4647 | 3729087873u, 1303930448u, |
4648 | 2002861219u, 165370827u, |
4649 | 916494250u, 1230085527u, |
4650 | 3103338579u, 3064290191u, |
4651 | 3807265751u, 3628174014u, |
4652 | 231181488u, 851743255u, |
4653 | 2295806711u, 1781190011u, |
4654 | 2988893883u, 1554380634u, |
4655 | 1142264800u, 3667013118u, |
4656 | 1968445277u, 315203929u, |
4657 | 2638023604u, 2290487377u, |
4658 | 732137533u, 1909203251u, |
4659 | 440398219u, 1891630171u, |
4660 | 1380301172u, 1498556724u, |
4661 | 4072067757u, 4165088768u, |
4662 | 4204318635u, 441430649u, |
4663 | 3931792696u, 197618179u, |
4664 | 956300927u, 914413116u, |
4665 | 3010839769u, 2837339569u, |
4666 | 2148126371u, 1913303225u, |
4667 | 3074915312u, 3117299654u, |
4668 | 4139181436u, 2993479124u, |
4669 | 3178848746u, 1357272220u, |
4670 | 1438494951u, 507436733u, |
4671 | 667183474u, 2084369203u, |
4672 | 3854939912u, 1413396341u, |
4673 | 126024219u, 146044391u, |
4674 | 1016656857u, 3022024459u, |
4675 | 3254014218u, 429095991u, |
4676 | 165589978u, 1578546616u, |
4677 | 985653208u, 1718653828u, |
4678 | 623071693u, 366414107u, |
4679 | 249776086u, 1207522198u, |
4680 | 3047342438u, 2991127487u, |
4681 | 3120876698u, 1684583131u, |
4682 | 46987739u, 1157614300u, |
4683 | 863214540u, 1087193030u, |
4684 | 199124911u, 520792961u, |
4685 | 3614377032u, 586863115u, |
4686 | 3331828431u, 1013201099u, |
4687 | 1716848157u, 4033596884u, |
4688 | 1164298657u, 4140791139u, |
4689 | 1146169032u, 1434258493u, |
4690 | 3824360466u, 3242407770u, |
4691 | 3725511003u, 232064808u, |
4692 | 872586426u, 762243036u, |
4693 | 2736953692u, 816692935u, |
4694 | 512845449u, 3748861010u, |
4695 | 2266795890u, 3781899767u, |
4696 | 4290630595u, 517646945u, |
4697 | 22638523u, 648000590u, |
4698 | 959214578u, 558910384u, |
4699 | 1283799121u, 3047062993u, |
4700 | 1024246061u, 4027776454u, |
4701 | 3544509313u, 622325861u, |
4702 | 834785312u, 382936554u, |
4703 | 411505255u, 1973395102u, |
4704 | 1825135056u, 2725923798u, |
4705 | 580988377u, 2826990641u, |
4706 | 3474970689u, 1029055034u, |
4707 | 812546227u, 2506885666u, |
4708 | 2584372201u, 1758123094u, |
4709 | 589567754u, 325737734u, |
4710 | 345313518u, 2022370576u, |
4711 | 3886113119u, 3338548567u, |
4712 | 257578986u, 3698087965u, |
4713 | 1776047957u, 1771384107u, |
4714 | 3604937815u, 3198590202u, |
4715 | 2305332220u, 191910725u, |
4716 | 4232136669u, 427759438u, |
4717 | 4244322689u, 542201663u, |
4718 | 3315355162u, 2135941665u, |
4719 | 556609672u, 45845311u, |
4720 | 1175961330u, 3948351189u, |
4721 | 23075771u, 3252374102u, |
4722 | 1634635545u, 4151937410u, |
4723 | 713127376u, 1467786451u, |
4724 | 663013031u, 3444053918u, |
4725 | 2638154051u, 810082938u, |
4726 | 3077742128u, 1062268187u, |
4727 | 2115441882u, 4081398201u, |
4728 | 3735739145u, 2794294783u, |
4729 | 2335576331u, 2560479831u, |
4730 | 1379288194u, 4225182569u, |
4731 | 2442302747u, 3948961926u, |
4732 | 3958366652u, 3067277639u, |
4733 | 3667516477u, 1709989541u, |
4734 | 1516711748u, 2339636583u, |
4735 | 4188504038u, 59581167u, |
4736 | 2725013602u, 3639843023u, |
4737 | 2658147000u, 2643979752u, |
4738 | 3758739543u, 4189944477u, |
4739 | 2470483982u, 877580602u, |
4740 | 2995362413u, 118817200u, |
4741 | 3252925478u, 2062343506u, |
4742 | 3981838403u, 3762572073u, |
4743 | 1231633714u, 4168280671u, |
4744 | 2931588131u, 3284356565u, |
4745 | 1129162571u, 732225574u, |
4746 | 4173605289u, 1407328702u, |
4747 | 1677744031u, 3532596884u, |
4748 | 3232041815u, 1652884780u, |
4749 | 2256541290u, 3459463480u, |
4750 | 3740979556u, 259034107u, |
4751 | 2227121257u, 1426140634u, |
4752 | 3606709555u, 3424793077u, |
4753 | 315836068u, 3200749877u, |
4754 | 1386256573u, 24035717u, |
4755 | 2982018998u, 1811050648u, |
4756 | 234531934u, 1115203611u, |
4757 | 1598686658u, 3146815575u, |
4758 | 1603559457u, 323296368u, |
4759 | 2632963283u, 1778459926u, |
4760 | 739944537u, 579625482u, |
4761 | 3486330348u, 492621815u, |
4762 | 1231665285u, 2457048126u, |
4763 | 3903349120u, 389846205u, |
4764 | 3355404249u, 3275550588u, |
4765 | 1052645068u, 862072556u, |
4766 | 2834153464u, 1481069623u, |
4767 | 2657392572u, 4279236653u, |
4768 | 1688445808u, 701920051u, |
4769 | 3740748788u, 3388062747u, |
4770 | 1873358321u, 2152785640u, |
4771 | 883382081u, 1005815394u, |
4772 | 1020177209u, 734239551u, |
4773 | 2371453141u, 100326520u, |
4774 | 3488500412u, 1279682138u, |
4775 | 2610427744u, 49703572u, |
4776 | 3026361211u, 605900428u, |
4777 | 302392721u, 2509302188u, |
4778 | 1416453607u, 2815915291u, |
4779 | 1862819968u, 519710058u, |
4780 | 2450888314u, 4017598378u, |
4781 | 937074653u, 3035635454u, |
4782 | 1590230729u, 3268013438u, |
4783 | 2710029305u, 12886044u, |
4784 | 3711259084u, 2627383582u, |
4785 | 3895772404u, 648534979u, |
4786 | 260307902u, 855990313u, |
4787 | 3669691805u, 263366740u, |
4788 | 2938543471u, 414331688u, |
4789 | 3080542944u, 3405007814u, |
4790 | 3565059103u, 1190977418u, |
4791 | 390836981u, 1606450012u, |
4792 | 2649808239u, 2514169310u, |
4793 | 2747519432u, 4129538640u, |
4794 | 1721522849u, 492099164u, |
4795 | 792990594u, 3625507637u, |
4796 | 2271095827u, 2993032712u, |
4797 | 2302363854u, 4013112951u, |
4798 | 1111617969u, 2183845740u, |
4799 | 795918276u, 1116991810u, |
4800 | 3110898804u, 3963062126u, |
4801 | 2737064702u, 462795667u, |
4802 | 937372240u, 1343017609u, |
4803 | 1091041189u, 2790555455u, |
4804 | 277024217u, 25485284u, |
4805 | 1166522068u, 1623631848u, |
4806 | 241727183u, 2836158787u, |
4807 | 3112996740u, 573836428u, |
4808 | 2721658101u, 1937681565u, |
4809 | 4175169209u, 3190765433u, |
4810 | 1970000788u, 1668258120u, |
4811 | 114616703u, 954762543u, |
4812 | 199237753u, 4094644498u, |
4813 | 2522281978u, 732086117u, |
4814 | 1756889687u, 2936126607u, |
4815 | 2437031370u, 4103143808u, |
4816 | 3883389541u, 3171090854u, |
4817 | 2483004780u, 1927385370u, |
4818 | 2360538162u, 2740855009u, |
4819 | 4241185118u, 1492209542u, |
4820 | 1672737098u, 2148675559u, |
4821 | 1789864670u, 2434313103u, |
4822 | 2319172611u, 2760941207u, |
4823 | 2636210123u, 1338083267u, |
4824 | 1128080590u, 822806371u, |
4825 | 1199583556u, 314727461u, |
4826 | 1335160250u, 2084630531u, |
4827 | 1156261526u, 316766066u, |
4828 | 112090465u, 3129033323u, |
4829 | 2746885618u, 636616055u, |
4830 | 2582210744u, 1721064910u, |
4831 | 3468394263u, 470463518u, |
4832 | 2076016059u, 408721884u, |
4833 | 2121041886u, 378460278u, |
4834 | 1915948002u, 357324860u, |
4835 | 2301682622u, 2691859523u, |
4836 | 1869756364u, 2429314418u, |
4837 | 2193146527u, 1185564327u, |
4838 | 2614088922u, 1975527044u, |
4839 | 919067651u, 2855948894u, |
4840 | 3662539576u, 1943802836u, |
4841 | 3529473373u, 1490330107u, |
4842 | 366036094u, 3384241033u, |
4843 | 4276268604u, 448403661u, |
4844 | 4271796078u, 1910401882u, |
4845 | 3077107698u, 299427366u, |
4846 | 2035665349u, 3201262636u, |
4847 | 3738454258u, 2554452696u, |
4848 | 3588997135u, 3363895827u, |
4849 | 1267505995u, 1852004679u, |
4850 | 2237827073u, 2803250686u, |
4851 | 3468044908u, 2143572850u, |
4852 | 1728158656u, 1022551180u, |
4853 | 1996680960u, 839529273u, |
4854 | 2400647871u, 2201096054u, |
4855 | 3606433628u, 2597259793u, |
4856 | 3544595875u, 3909443124u, |
4857 | 819278607u, 3447346709u, |
4858 | 806136613u, 2711436388u, |
4859 | 3656063205u, 837475154u, |
4860 | 694525336u, 4070212073u, |
4861 | 4011303412u, 1068395209u, |
4862 | 438095290u, 484603494u, |
4863 | 2673730227u, 737767009u, |
4864 | 642310823u, 3914002299u, |
4865 | 308425103u, 268427550u, |
4866 | 1334387085u, 4069797497u, |
4867 | 4280783219u, 2914011058u, |
4868 | 4243643405u, 2849988118u, |
4869 | 2504230175u, 1817156623u, |
4870 | 2804200483u, 3406991497u, |
4871 | 2948254999u, 2102063419u, |
4872 | 1071272117u, 514889942u, |
4873 | 571972433u, 1246595599u, |
4874 | 1735616066u, 1539151988u, |
4875 | 1230831543u, 277987182u, |
4876 | 4269526481u, 991511607u, |
4877 | 95237878u, 2005032160u, |
4878 | 1291113144u, 626619670u, |
4879 | 3560835907u, 164940926u, |
4880 | 1433635018u, 116647396u, |
4881 | 3039097112u, 2868163232u, |
4882 | 1141645918u, 1764165478u, |
4883 | 881378302u, 2159170082u, |
4884 | 2953647681u, 1011320066u, |
4885 | 184856151u, 1723308975u, |
4886 | 336034862u, 2017579106u, |
4887 | 1476681709u, 147523618u, |
4888 | 3896252223u, 2264728166u, |
4889 | 944743644u, 1694443528u, |
4890 | 2690700128u, 1947321519u, |
4891 | 735478508u, 4058183171u, |
4892 | 260177668u, 505662155u, |
4893 | 2391691262u, 1920739747u, |
4894 | 3216960415u, 1898176786u, |
4895 | 3722741628u, 1511077569u, |
4896 | 449636564u, 983350414u, |
4897 | 2580237367u, 2055059789u, |
4898 | 1103819072u, 2089123665u, |
4899 | 3873755579u, 2718467458u, |
4900 | 3124338704u, 3204250304u, |
4901 | 2475035432u, 1120017626u, |
4902 | 3873758287u, 1982999824u, |
4903 | 2950794582u, 780634378u, |
4904 | 2842141483u, 4029205195u, |
4905 | 1656892865u, 3330993377u, |
4906 | 80890710u, 1953796601u, |
4907 | 3873078673u, 136118734u, |
4908 | 2317676604u, 4199091610u, |
4909 | 1864448181u, 3063437608u, |
4910 | 1699452298u, 1403506686u, |
4911 | 1513069466u, 2348491299u, |
4912 | 4273657745u, 4055855649u, |
4913 | 1805475756u, 2562064338u, |
4914 | 973124563u, 4197091358u, |
4915 | 172861513u, 2858726767u, |
4916 | 4271866024u, 3071338162u, |
4917 | 3590386266u, 2328277259u, |
4918 | 1096050703u, 1189614342u, |
4919 | 459509140u, 771592405u, |
4920 | 817999971u, 3740825152u, |
4921 | 520400189u, 1941874618u, |
4922 | 185232757u, 4032960199u, |
4923 | 3928245258u, 3527721294u, |
4924 | 1301118856u, 752188080u, |
4925 | 3512945009u, 308584855u, |
4926 | 2105373972u, 752872278u, |
4927 | 3823368815u, 3760952096u, |
4928 | 4250142168u, 2565680167u, |
4929 | 3646354146u, 1259957455u, |
4930 | 1085857127u, 3471066607u, |
4931 | 38924274u, 3770488806u, |
4932 | 1083869477u, 3312508103u, |
4933 | 71956383u, 3738784936u, |
4934 | 3099963860u, 1255084262u, |
4935 | 4286969992u, 3621849251u, |
4936 | 1190908967u, 1831557743u, |
4937 | 2363435042u, 54945052u, |
4938 | 4059585566u, 4023974274u, |
4939 | 1788578453u, 3442180039u, |
4940 | 2534883189u, 2432427547u, |
4941 | 3909757989u, 731996369u, |
4942 | 4168347425u, 1356028512u, |
4943 | 2741583197u, 1280920000u, |
4944 | 312887059u, 3259015297u, |
4945 | 3946278527u, 4135481831u, |
4946 | 1281043691u, 1121403845u, |
4947 | 3312292477u, 1819941269u, |
4948 | 1741932545u, 3293015483u, |
4949 | 2127558730u, 713121337u, |
4950 | 2635469238u, 486003418u, |
4951 | 4015067527u, 2976737859u, |
4952 | 2108187161u, 927011680u, |
4953 | 1970188338u, 4177613234u, |
4954 | 1799789551u, 2118505126u, |
4955 | 4134691985u, 1958963937u, |
4956 | 1929210029u, 2555835851u, |
4957 | 2768832862u, 910892050u, |
4958 | 2567532373u, 4075249328u, |
4959 | 86689814u, 3726640307u, |
4960 | 1392137718u, 1240000030u, |
4961 | 4104757832u, 3026358429u, |
4962 | 313797689u, 1435798509u, |
4963 | 3101500919u, 1241665335u, |
4964 | 3573008472u, 3615577014u, |
4965 | 3767659003u, 3134294021u, |
4966 | 4063565523u, 2296824134u, |
4967 | 1541946015u, 3087190425u, |
4968 | 2693152531u, 2199672572u, |
4969 | 2123763822u, 1034244398u, |
4970 | 857839960u, 2515339233u, |
4971 | 2228007483u, 1628096047u, |
4972 | 2116502287u, 2502657424u, |
4973 | 2809830736u, 460237542u, |
4974 | 450205998u, 3646921704u, |
4975 | 3818199357u, 1808504491u, |
4976 | 1950698961u, 2069753399u, |
4977 | 3657033172u, 3734547671u, |
4978 | 4067859590u, 3292597295u, |
4979 | 1106466069u, 356742959u, |
4980 | 2469567432u, 3495418823u, |
4981 | 183440071u, 3248055817u, |
4982 | 3662626864u, 1750561299u, |
4983 | 3926138664u, 4088592524u, |
4984 | 567122118u, 3810297651u, |
4985 | 992181339u, 3384018814u, |
4986 | 3272124369u, 3177596743u, |
4987 | 320086295u, 2316548367u, |
4988 | 100741310u, 451656820u, |
4989 | 4086604273u, 3759628395u, |
4990 | 2553391092u, 1745659881u, |
4991 | 3650357479u, 2390172694u, |
4992 | 330172533u, 767377322u, |
4993 | 526742034u, 4102497288u, |
4994 | 2088767754u, 164402616u, |
4995 | 2482632320u, 2352347393u, |
4996 | 1873658044u, 3861555476u, |
4997 | 2751052984u, 1767810825u, |
4998 | 20037241u, 545143220u, |
4999 | 2594532522u, 472304191u, |
5000 | 3441135892u, 3323383489u, |
5001 | 258785117u, 2977745165u, |
5002 | 2781737565u, 2963590112u, |
5003 | 2756998822u, 207428029u, |
5004 | 2581558559u, 3824717027u, |
5005 | 1258619503u, 3472047571u, |
5006 | 2648427775u, 2360400900u, |
5007 | 2393763818u, 2332399088u, |
5008 | 3932701729u, 884421165u, |
5009 | 1396468647u, 1377764574u, |
5010 | 4061795938u, 1559119087u, |
5011 | 3343596838u, 3604258095u, |
5012 | 1435134775u, 1099809675u, |
5013 | 908163739u, 1418405656u, |
5014 | 368446627u, 3741651161u, |
5015 | 3374512975u, 3542220540u, |
5016 | 3244772570u, 200009340u, |
5017 | 3198975081u, 2521038253u, |
5018 | 4081637863u, 337070226u, |
5019 | 3235259030u, 3897262827u, |
5020 | 736956644u, 641040550u, |
5021 | 644850146u, 1306761320u, |
5022 | 4219448634u, 193750500u, |
5023 | 3293278106u, 1383997679u, |
5024 | 1242645122u, 4109252858u, |
5025 | 450747727u, 3716617561u, |
5026 | 362725793u, 2252520167u, |
5027 | 3377483696u, 1788337208u, |
5028 | 8130777u, 3226734120u, |
5029 | 759239140u, 1012411364u, |
5030 | 1658628529u, 2911512007u, |
5031 | 1002580201u, 1681898320u, |
5032 | 3039016929u, 4294520281u, |
5033 | 367022558u, 3071359622u, |
5034 | 3205848570u, 152989999u, |
5035 | 3839042136u, 2357687350u, |
5036 | 4273132307u, 3898950547u, |
5037 | 1176841812u, 1314157485u, |
5038 | 75443951u, 1027027239u, |
5039 | 1858986613u, 2040551642u, |
5040 | 36574105u, 2603059541u, |
5041 | 3456147251u, 2137668425u, |
5042 | 4077477194u, 3565689036u, |
5043 | 491832241u, 363703593u, |
5044 | 2579177168u, 3589545214u, |
5045 | 265993036u, 1864569342u, |
5046 | 4149035573u, 3189253455u, |
5047 | 1072259310u, 3153745937u, |
5048 | 923017956u, 490608221u, |
5049 | 855846773u, 845706553u, |
5050 | 1018226240u, 1604548872u, |
5051 | 3833372385u, 3287246572u, |
5052 | 2757959551u, 2452872151u, |
5053 | 1553870564u, 1713154780u, |
5054 | 2649450292u, 500120236u, |
5055 | 84251717u, 661869670u, |
5056 | 1444911517u, 2489716881u, |
5057 | 2810524030u, 1561519055u, |
5058 | 3884088359u, 2509890699u, |
5059 | 4247155916u, 1005636939u, |
5060 | 3224066062u, 2774151984u, |
5061 | 2035978240u, 2514910366u, |
5062 | 1478837908u, 3144450144u, |
5063 | 2107011431u, 96459446u, |
5064 | 3587732908u, 2389230590u, |
5065 | 3287635953u, 250533792u, |
5066 | 1235983679u, 4237425634u, |
5067 | 3704645833u, 3882376657u, |
5068 | 2976369049u, 1187061987u, |
5069 | 276949224u, 4100839753u, |
5070 | 1698347543u, 1629662314u, |
5071 | 1556151829u, 3784939568u, |
5072 | 427484362u, 4246879223u, |
5073 | 3155311770u, 4285163791u, |
5074 | 1693376813u, 124492786u, |
5075 | 1858777639u, 3476334357u, |
5076 | 1941442701u, 1121980173u, |
5077 | 3485932087u, 820852908u, |
5078 | 358032121u, 2511026735u, |
5079 | 1873607283u, 2556067450u, |
5080 | 2248275536u, 1528632094u, |
5081 | 1535473864u, 556796152u, |
5082 | 1499201704u, 1472623890u, |
5083 | 1526518503u, 3692729434u, |
5084 | 1476438092u, 2913077464u, |
5085 | 335109599u, 2167614601u, |
5086 | 4121131078u, 3158127917u, |
5087 | 3051522276u, 4046477658u, |
5088 | 2857717851u, 1863977403u, |
5089 | 1341023343u, 692059110u, |
5090 | 1802040304u, 990407433u, |
5091 | 3285847572u, 319814144u, |
5092 | 561105582u, 1540183799u, |
5093 | 4052924496u, 2926590471u, |
5094 | 2244539806u, 439121871u, |
5095 | 3317903224u, 3178387550u, |
5096 | 4265214507u, 82077489u, |
5097 | 1978918971u, 4279668976u, |
5098 | 128732476u, 2853224222u, |
5099 | 464407878u, 4190838199u, |
5100 | 997819001u, 3250520802u, |
5101 | 2330081301u, 4095846095u, |
5102 | 733509243u, 1583801700u, |
5103 | 722314527u, 3552883023u, |
5104 | 1403784280u, 432327540u, |
5105 | 1877837196u, 3912423882u, |
5106 | 505219998u, 696031431u, |
5107 | 908238873u, 4189387259u, |
5108 | 8759461u, 2540185277u, |
5109 | 3385159748u, 381355877u, |
5110 | 2519951681u, 1679786240u, |
5111 | 2019419351u, 4051584612u, |
5112 | 1933923923u, 3768201861u, |
5113 | 1670133081u, 3454981037u, |
5114 | 700836153u, 1675560450u, |
5115 | 371560700u, 338262316u, |
5116 | 847351840u, 2222395828u, |
5117 | 3130433948u, 405251683u, |
5118 | 3037574880u, 184098830u, |
5119 | 453340528u, 1385561439u, |
5120 | 2224044848u, 4071581802u, |
5121 | 1431235296u, 5570097u, |
5122 | 570114376u, 2287305551u, |
5123 | 2272418128u, 803575837u, |
5124 | 3943113491u, 414959787u, |
5125 | 708083137u, 2452657767u, |
5126 | 4019147902u, 3841480082u, |
5127 | 3791794715u, 2965956183u, |
5128 | 2763690963u, 2350937598u, |
5129 | 3424361375u, 779434428u, |
5130 | 1274947212u, 686105485u, |
5131 | 3426668051u, 3692865672u, |
5132 | 3057021940u, 2285701422u, |
5133 | 349809124u, 1379278508u, |
5134 | 3623750518u, 215970497u, |
5135 | 1783152480u, 823305654u, |
5136 | 216118434u, 1787189830u, |
5137 | 3692048450u, 2272612521u, |
5138 | 3032187389u, 4159715581u, |
5139 | 1388133148u, 1611772864u, |
5140 | 2544383526u, 552925303u, |
5141 | 3420960112u, 3198900547u, |
5142 | 3503230228u, 2603352423u, |
5143 | 2318375898u, 4064071435u, |
5144 | 3006227299u, 4194096960u, |
5145 | 1283392422u, 1510460996u, |
5146 | 174272138u, 3671038966u, |
5147 | 1775955687u, 1719108984u, |
5148 | 1763892006u, 1385029063u, |
5149 | 4083790740u, 406757708u, |
5150 | 684087286u, 531310503u, |
5151 | 3329923157u, 3492083607u, |
5152 | 1059031410u, 3037314475u, |
5153 | 3105682208u, 3382290593u, |
5154 | 2292208503u, 426380557u, |
5155 | 97373678u, 3842309471u, |
5156 | 777173623u, 3241407531u, |
5157 | 303065016u, 1477104583u, |
5158 | 4234905200u, 2512514774u, |
5159 | 2649684057u, 1397502982u, |
5160 | 1802596032u, 3973022223u, |
5161 | 2543566442u, 3139578968u, |
5162 | 3193669211u, 811750340u, |
5163 | 4013496209u, 567361887u, |
5164 | 4169410406u, 3622282782u, |
5165 | 3403136990u, 2540585554u, |
5166 | 895210040u, 3862229802u, |
5167 | 1145435213u, 4146963980u, |
5168 | 784952939u, 943914610u, |
5169 | 573034522u, 464420660u, |
5170 | 2356867109u, 3054347639u, |
5171 | 3985088434u, 1911188923u, |
5172 | 583391304u, 176468511u, |
5173 | 2990150068u, 2338031599u, |
5174 | 519948041u, 3181425568u, |
5175 | 496106033u, 4110294665u, |
5176 | 2736756930u, 1196757691u, |
5177 | 1089679033u, 240953857u, |
5178 | 3399092928u, 4040779538u, |
5179 | 2843673626u, 240495962u, |
5180 | 3017658263u, 3828377737u, |
5181 | 4243717901u, 2448373688u, |
5182 | 2759616657u, 2246245780u, |
5183 | 308018483u, 4262383425u, |
5184 | 2731780771u, 328023017u, |
5185 | 2884443148u, 841480070u, |
5186 | 3188015819u, 4051263539u, |
5187 | 2298178908u, 2944209234u, |
5188 | 1372958390u, 4164532914u, |
5189 | 4074952232u, 1683612329u, |
5190 | 2155036654u, 1872815858u, |
5191 | 2041174279u, 2368092311u, |
5192 | 206775997u, 2283918569u, |
5193 | 645945606u, 115406202u, |
5194 | 4206471368u, 3923500892u, |
5195 | 2217060665u, 350160869u, |
5196 | 706531239u, 2824302286u, |
5197 | 509981657u, 1469342315u, |
5198 | 140980u, 1891558063u, |
5199 | 164887091u, 3094962711u, |
5200 | 3437115622u, 13327420u, |
5201 | 422986366u, 330624974u, |
5202 | 3630863408u, 2425505046u, |
5203 | 824008515u, 3543885677u, |
5204 | 918718096u, 376390582u, |
5205 | 3224043675u, 3724791476u, |
5206 | 1837192976u, 2968738516u, |
5207 | 3424344721u, 3187805406u, |
5208 | 1550978788u, 1743089918u, |
5209 | 4251270061u, 645016762u, |
5210 | 3855037968u, 1928519266u, |
5211 | 1373803416u, 2289007286u, |
5212 | 1889218686u, 1610271373u, |
5213 | 3059200728u, 2108753646u, |
5214 | 582042641u, 812347242u, |
5215 | 3188172418u, 191994904u, |
5216 | 1343511943u, 2247006571u, |
5217 | 463291708u, 2697254095u, |
5218 | 1534175504u, 1106275740u, |
5219 | 622521957u, 917121602u, |
5220 | 4095777215u, 3955972648u, |
5221 | 3852234638u, 2845309942u, |
5222 | 3299763344u, 2864033668u, |
5223 | 2554947496u, 799569078u, |
5224 | 2551629074u, 1102873346u, |
5225 | 2661022773u, 2006922227u, |
5226 | 2900438444u, 1448194126u, |
5227 | 1321567432u, 1983773590u, |
5228 | 1237256330u, 3449066284u, |
5229 | 1691553115u, 3274671549u, |
5230 | 4271625619u, 2741371614u, |
5231 | 3285899651u, 786322314u, |
5232 | 1586632825u, 564385522u, |
5233 | 2530557509u, 2974240289u, |
5234 | 1244759631u, 3263135197u, |
5235 | 3592389776u, 3570296884u, |
5236 | 2749873561u, 521432811u, |
5237 | 987586766u, 3206261120u, |
5238 | 1327840078u, 4078716491u, |
5239 | 1753812954u, 976892272u, |
5240 | 1827135136u, 1781944746u, |
5241 | 1328622957u, 1015377974u, |
5242 | 3439601008u, 2209584557u, |
5243 | 2482286699u, 1109175923u, |
5244 | 874877499u, 2036083451u, |
5245 | 483570344u, 1091877599u, |
5246 | 4190721328u, 1129462471u, |
5247 | 640035849u, 1867372700u, |
5248 | 920761165u, 3273688770u, |
5249 | 1623777358u, 3389003793u, |
5250 | 3241132743u, 2734783008u, |
5251 | 696674661u, 2502161880u, |
5252 | 1646071378u, 1164309901u, |
5253 | 350411888u, 1978005963u, |
5254 | 2253937037u, 7371540u, |
5255 | 989577914u, 3626554867u, |
5256 | 3214796883u, 531343826u, |
5257 | 398899695u, 1145247203u, |
5258 | 1516846461u, 3656006011u, |
5259 | 529303412u, 3318455811u, |
5260 | 3062828129u, 1696355359u, |
5261 | 3698796465u, 3155218919u, |
5262 | 1457595996u, 3191404246u, |
5263 | 1395609912u, 2917345728u, |
5264 | 1237411891u, 1854985978u, |
5265 | 1091884675u, 3504488111u, |
5266 | 3109924189u, 1628881950u, |
5267 | 3939149151u, 878608872u, |
5268 | 778235395u, 1052990614u, |
5269 | 903730231u, 2069566979u, |
5270 | 2437686324u, 3163786257u, |
5271 | 2257884264u, 2123173186u, |
5272 | 939764916u, 2933010098u, |
5273 | 1235300371u, 1256485167u, |
5274 | 1950274665u, 2180372319u, |
5275 | 2648400302u, 122035049u, |
5276 | 1883344352u, 2083771672u, |
5277 | 3712110541u, 321199441u, |
5278 | 1896357377u, 508560958u, |
5279 | 3066325351u, 2770847216u, |
5280 | 3177982504u, 296902736u, |
5281 | 1486926688u, 456842861u, |
5282 | 601221482u, 3992583643u, |
5283 | 2794121515u, 1533934172u, |
5284 | 1706465470u, 4281971893u, |
5285 | 2557027816u, 900741486u, |
5286 | 227175484u, 550595824u, |
5287 | 690918144u, 2825943628u, |
5288 | 90375300u, 300318232u, |
5289 | 1985329734u, 1440763373u, |
5290 | 3670603707u, 2533900859u, |
5291 | 3253901179u, 542270815u, |
5292 | 3677388841u, 307706478u, |
5293 | 2570910669u, 3320103693u, |
5294 | 1273768482u, 1216399252u, |
5295 | 1652924805u, 1043647584u, |
5296 | 1120323676u, 639941430u, |
5297 | 325675502u, 3652676161u, |
5298 | 4241680335u, 1545838362u, |
5299 | 1991398008u, 4100211814u, |
5300 | 1097584090u, 3262252593u, |
5301 | 2254324292u, 1765019121u, |
5302 | 4060211241u, 2315856188u, |
5303 | 3704419305u, 411263051u, |
5304 | 238929055u, 3540688404u, |
5305 | 3094544537u, 3250435765u, |
5306 | 3460621305u, 1967599860u, |
5307 | 2016157366u, 847389916u, |
5308 | 1659615591u, 4020453639u, |
5309 | 901109753u, 2682611693u, |
5310 | 1661364280u, 177155177u, |
5311 | 3210561911u, 3802058181u, |
5312 | 797089608u, 3286110054u, |
5313 | 2110358240u, 1353279028u, |
5314 | 2479975820u, 471725410u, |
5315 | 2219863904u, 3623364733u, |
5316 | 3167128228u, 1052188336u, |
5317 | 3656587111u, 721788662u, |
5318 | 3061255808u, 1615375832u, |
5319 | 924941453u, 2547780700u, |
5320 | 3328169224u, 1310964134u, |
5321 | 2701956286u, 4145497671u, |
5322 | 1421461094u, 1221397398u, |
5323 | 1589183618u, 1492533854u, |
5324 | 449740816u, 2686506989u, |
5325 | 3035198924u, 1682886232u, |
5326 | 2529760244u, 3342031659u, |
5327 | 1235084019u, 2151665147u, |
5328 | 2315686577u, 3282027660u, |
5329 | 1140138691u, 2754346599u, |
5330 | 2091754612u, 1178454681u, |
5331 | 4226896579u, 2942520471u, |
5332 | 2122168506u, 3751680858u, |
5333 | 3213794286u, 2601416506u, |
5334 | 4142747914u, 3951404257u, |
5335 | 4243249649u, 748595836u, |
5336 | 4004834921u, 238887261u, |
5337 | 1927321047u, 2217148444u, |
5338 | 205977665u, 1885975275u, |
5339 | 186020771u, 2367569534u, |
5340 | 2941662631u, 2608559272u, |
5341 | 3342096731u, 741809437u, |
5342 | 1962659444u, 3539886328u, |
5343 | 3036596491u, 2282550094u, |
5344 | 2366462727u, 2748286642u, |
5345 | 2144472852u, 1390394371u, |
5346 | 1257385924u, 2205425874u, |
5347 | 2119055686u, 46865323u, |
5348 | 3597555910u, 3188438773u, |
5349 | 2372320753u, 3641116924u, |
5350 | 3116286108u, 2680722658u, |
5351 | 3371014971u, 2058751609u, |
5352 | 2966943726u, 2345078707u, |
5353 | 2330535244u, 4013841927u, |
5354 | 1169588594u, 857915866u, |
5355 | 1875260989u, 3175831309u, |
5356 | 3193475664u, 1955181430u, |
5357 | 923161569u, 4068653043u, |
5358 | 776445899u, 954196929u, |
5359 | 61509556u, 4248237857u, |
5360 | 3808667664u, 581227317u, |
5361 | 2893240187u, 4159497403u, |
5362 | 4212264930u, 3973886195u, |
5363 | 2077539039u, 851579036u, |
5364 | 2957587591u, 772351886u, |
5365 | 1173659554u, 946748363u, |
5366 | 2794103714u, 2094375930u, |
5367 | 4234750213u, 3671645488u, |
5368 | 2614250782u, 2620465358u, |
5369 | 3122317317u, 2365436865u, |
5370 | 3393973390u, 523513960u, |
5371 | 3645735309u, 2766686992u, |
5372 | 2023960931u, 2312244996u, |
5373 | 1875932218u, 3253711056u, |
5374 | 3622416881u, 3274929205u, |
5375 | 612094988u, 1555465129u, |
5376 | 2114270406u, 3553762793u, |
5377 | 1832633644u, 1087551556u, |
5378 | 3306195841u, 1702313921u, |
5379 | 3675066046u, 1735998785u, |
5380 | 1690923980u, 1482649756u, |
5381 | 1171351291u, 2043136409u, |
5382 | 1962596992u, 461214626u, |
5383 | 3278253346u, 1392428048u, |
5384 | 3744621107u, 1028502697u, |
5385 | 3991171462u, 1014064003u, |
5386 | 3642345425u, 3186995039u, |
5387 | 6114625u, 3359104346u, |
5388 | 414856965u, 2814387514u, |
5389 | 3583605071u, 2497896367u, |
5390 | 1024572712u, 1927582962u, |
5391 | 2892797583u, 845302635u, |
5392 | 328548052u, 1523379748u, |
5393 | 3392622118u, 1347167673u, |
5394 | 1012316581u, 37767602u, |
5395 | 2647726017u, 1070326065u, |
5396 | 2075035198u, 4202817168u, |
5397 | 2502924707u, 2612406822u, |
5398 | 2187115553u, 1180137213u, |
5399 | 701024148u, 1481965992u, |
5400 | 3223787553u, 2083541843u, |
5401 | 203230202u, 3876887380u, |
5402 | 1334816273u, 2870251538u, |
5403 | 2186205850u, 3985213979u, |
5404 | 333533378u, 806507642u, |
5405 | 1010064531u, 713520765u, |
5406 | 3084131515u, 2637421459u, |
5407 | 1703168933u, 1517562266u, |
5408 | 4089081247u, 3231042924u, |
5409 | 3079916123u, 3154574447u, |
5410 | 2253948262u, 1725190035u, |
5411 | 2452539325u, 1343734533u, |
5412 | 213706059u, 2519409656u, |
5413 | 108055211u, 2916327746u, |
5414 | 587001593u, 1917607088u, |
5415 | 4202913084u, 926304016u, |
5416 | 469255411u, 4042080256u, |
5417 | 3498936874u, 246692543u, |
5418 | 495780578u, 438717281u, |
5419 | 2259272650u, 4011324645u, |
5420 | 2836854664u, 2317249321u, |
5421 | 946828752u, 1280403658u, |
5422 | 1905648354u, 2034241661u, |
5423 | 774652981u, 1285694082u, |
5424 | 2200307766u, 2158671727u, |
5425 | 1135162148u, 232040752u, |
5426 | 397012087u, 1717527689u, |
5427 | 1720414106u, 918797022u, |
5428 | 2580119304u, 3568069742u, |
5429 | 2904461070u, 3893453420u, |
5430 | 973817938u, 667499332u, |
5431 | 3785870412u, 2088861715u, |
5432 | 1565179401u, 600903026u, |
5433 | 591806775u, 3512242245u, |
5434 | 997964515u, 2339605347u, |
5435 | 1134342772u, 3234226304u, |
5436 | 4084179455u, 302315791u, |
5437 | 2445626811u, 2590372496u, |
5438 | 345572299u, 2274770442u, |
5439 | 3600587867u, 3706939009u, |
5440 | 1430507980u, 2656330434u, |
5441 | 1079209397u, 2122849632u, |
5442 | 1423705223u, 3826321888u, |
5443 | 3683385276u, 1057038163u, |
5444 | 1242840526u, 3987000643u, |
5445 | 2398253089u, 1538190921u, |
5446 | 1295898647u, 3570196893u, |
5447 | 3065138774u, 3111336863u, |
5448 | 2524949549u, 4203895425u, |
5449 | 3025864372u, 968800353u, |
5450 | 1023721001u, 3763083325u, |
5451 | 526350786u, 635552097u, |
5452 | 2308118370u, 2166472723u, |
5453 | 2196937373u, 2643841788u, |
5454 | 3040011470u, 4010301879u, |
5455 | 2782379560u, 3474682856u, |
5456 | 4201389782u, 4223278891u, |
5457 | 1457302296u, 2251842132u, |
5458 | 1090062008u, 3188219189u, |
5459 | 292733931u, 1424229089u, |
5460 | 1590782640u, 1365212370u, |
5461 | 3975957073u, 3982969588u, |
5462 | 2927147928u, 1048291071u, |
5463 | 2766680094u, 884908196u, |
5464 | 35237839u, 2221180633u, |
5465 | 2490333812u, 4098360768u, |
5466 | 4029081103u, 3490831871u, |
5467 | 2392516272u, 3455379186u, |
5468 | 3948800722u, 335456628u, |
5469 | 2105117968u, 4181629008u, |
5470 | 1044201772u, 3335754111u, |
5471 | 540133451u, 3313113759u, |
5472 | 3786107905u, 2627207327u, |
5473 | 3540337875u, 3473113388u, |
5474 | 3430536378u, 2514123129u, |
5475 | 2124531276u, 3872633376u, |
5476 | 3272957388u, 3501994650u, |
5477 | 2418881542u, 487365389u, |
5478 | 3877672368u, 1512866656u, |
5479 | 3486531087u, 2102955203u, |
5480 | 1136054817u, 3004241477u, |
5481 | 1549075351u, 1302002008u, |
5482 | 3936430045u, 2258587644u, |
5483 | 4109233936u, 3679809321u, |
5484 | 3467083076u, 2484463221u, |
5485 | 1594979755u, 529218470u, |
5486 | 3527024461u, 1147434678u, |
5487 | 106799023u, 1823161970u, |
5488 | 1704656738u, 1675883700u, |
5489 | 3308746763u, 1875093248u, |
5490 | 1352868568u, 1898561846u, |
5491 | 2508994984u, 3177750780u, |
5492 | 4217929592u, 400784472u, |
5493 | 80090315u, 3564414786u, |
5494 | 3841585648u, 3379293868u, |
5495 | 160353261u, 2413172925u, |
5496 | 2378499279u, 673436726u, |
5497 | 1505702418u, 1330977363u, |
5498 | 1853298225u, 3201741245u, |
5499 | 2135714208u, 4069554166u, |
5500 | 3715612384u, 3692488887u, |
5501 | 3680311316u, 4274382900u, |
5502 | 914186796u, 2264886523u, |
5503 | 3869634032u, 1254199592u, |
5504 | 1131020455u, 194781179u, |
5505 | 429923922u, 2763792336u, |
5506 | 2052895198u, 3997373194u, |
5507 | 3440090658u, 2165746386u, |
5508 | 1575500242u, 3463310191u, |
5509 | 2064974716u, 3779513671u, |
5510 | 3106421434u, 880320527u, |
5511 | 3281914119u, 286569042u, |
5512 | 3909096631u, 122359727u, |
5513 | 1429837716u, 252230074u, |
5514 | 4111461225u, 762273136u, |
5515 | 93658514u, 2766407143u, |
5516 | 3623657004u, 3869801679u, |
5517 | 3925695921u, 2390397316u, |
5518 | 2499025338u, 2741806539u, |
5519 | 2507199021u, 1659221866u, |
5520 | 361292116u, 4048761557u, |
5521 | 3797133396u, 1517903247u, |
5522 | 3121647246u, 3884308578u, |
5523 | 1697201500u, 1558800262u, |
5524 | 4150812360u, 3161302278u, |
5525 | 2610217849u, 641564641u, |
5526 | 183814518u, 2075245419u, |
5527 | 611996508u, 2223461433u, |
5528 | 329123979u, 121860586u, |
5529 | 860985829u, 1137889144u, |
5530 | 4018949439u, 2904348960u, |
5531 | 947795261u, 1992594155u, |
5532 | 4255427501u, 2281583851u, |
5533 | 2892637604u, 1478186924u, |
5534 | 3050771207u, 2767035539u, |
5535 | 373510582u, 1963520320u, |
5536 | 3763848370u, 3756817798u, |
5537 | 627269409u, 1806905031u, |
5538 | 1814444610u, 3646665053u, |
5539 | 1822693920u, 278515794u, |
5540 | 584050483u, 4142579188u, |
5541 | 2149745808u, 3193071606u, |
5542 | 1179706341u, 2693495182u, |
5543 | 3259749808u, 644172091u, |
5544 | 880509048u, 3340630542u, |
5545 | 3365160815u, 2384445068u, |
5546 | 3053081915u, 2840648309u, |
5547 | 1986990122u, 1084703471u, |
5548 | 2370410550u, 1627743573u, |
5549 | 2244943480u, 4057483496u, |
5550 | 2611595995u, 2470013639u, |
5551 | 4024732359u, 3987190386u, |
5552 | 873421687u, 2447660175u, |
5553 | 3226583022u, 767655877u, |
5554 | 2528024413u, 1962070688u, |
5555 | 1233635843u, 2163464207u, |
5556 | 659054446u, 854207134u, |
5557 | 258410943u, 4197831420u, |
5558 | 2515400215u, 3100476924u, |
5559 | 1961549594u, 2219491151u, |
5560 | 3997658851u, 163850514u, |
5561 | 470325051u, 2598261204u, |
5562 | 3052145580u, 59836528u, |
5563 | 1376188597u, 966733415u, |
5564 | 850667549u, 3622479237u, |
5565 | 1083731990u, 1525777459u, |
5566 | 4005126532u, 1428155540u, |
5567 | 2781907007u, 943739431u, |
5568 | 1493961005u, 2839096988u, |
5569 | 2000057832u, 1941829603u, |
5570 | 1901484772u, 939810041u, |
5571 | 3377407371u, 3090115837u, |
5572 | 3310840540u, 2068409688u, |
5573 | 3261383939u, 2212130277u, |
5574 | 2594774045u, 2912652418u, |
5575 | 4179816101u, 3534504531u, |
5576 | 3349254805u, 2796552902u, |
5577 | 1385421283u, 4259908631u, |
5578 | 3714780837u, 3070073945u, |
5579 | 3372846298u, 3835884044u, |
5580 | 3047965714u, 3009018735u, |
5581 | 744091167u, 1861124263u, |
5582 | 2764936304u, 1338171648u, |
5583 | 4222019554u, 1395200692u, |
5584 | 1371426007u, 3338031581u, |
5585 | 2525665319u, 4196233786u, |
5586 | 2332743921u, 1474702008u, |
5587 | 2274266301u, 4255175517u, |
5588 | 2290169528u, 1793910997u, |
5589 | 2188254024u, 354202001u, |
5590 | 3864458796u, 4280290498u, |
5591 | 1554419340u, 1733094688u, |
5592 | 2010552302u, 1561807039u, |
5593 | 664313606u, 2548990879u, |
5594 | 1084699349u, 3233936866u, |
5595 | 973895284u, 2386881969u, |
5596 | 1831995860u, 2961465052u, |
5597 | 1428704144u, 3269904970u, |
5598 | 231648253u, 2602483763u, |
5599 | 4125013173u, 3319187387u, |
5600 | 3347011944u, 1892898231u, |
5601 | 4019114049u, 868879116u, |
5602 | 4085937045u, 2378411019u, |
5603 | 1072588531u, 3547435717u, |
5604 | 2208070766u, 1069899078u, |
5605 | 3142980597u, 2337088907u, |
5606 | 1593338562u, 919414554u, |
5607 | 688077849u, 3625708135u, |
5608 | 1472447348u, 1947711896u, |
5609 | 3953006207u, 877438080u, |
5610 | 845995820u, 3150361443u, |
5611 | 3053496713u, 2484577841u, |
5612 | 224271045u, 2914958001u, |
5613 | 2682612949u, 806655563u, |
5614 | 2436224507u, 1907729235u, |
5615 | 2920583824u, 1251814062u, |
5616 | 2070814520u, 4034325578u, |
5617 | 497847539u, 2714317144u, |
5618 | 385182008u, 640855184u, |
5619 | 1327075087u, 1062468773u, |
5620 | 1757405994u, 1374270191u, |
5621 | 4263183176u, 3041193150u, |
5622 | 1037871524u, 3633173991u, |
5623 | 4231821821u, 2830131945u, |
5624 | 3505072908u, 2830570613u, |
5625 | 4195208715u, 575398021u, |
5626 | 3992840257u, 3691788221u, |
5627 | 1949847968u, 2999344380u, |
5628 | 3183782163u, 3723754342u, |
5629 | 759716128u, 3284107364u, |
5630 | 1714496583u, 15918244u, |
5631 | 820509475u, 2553936299u, |
5632 | 2201876606u, 4237151697u, |
5633 | 2605688266u, 3253705097u, |
5634 | 1008333207u, 712158730u, |
5635 | 1722280252u, 1933868287u, |
5636 | 4152736859u, 2097020806u, |
5637 | 584426382u, 2836501956u, |
5638 | 2522777566u, 1996172430u, |
5639 | 2122199776u, 1069285218u, |
5640 | 1474209360u, 690831894u, |
5641 | 107482532u, 3695525410u, |
5642 | 670591796u, 768977505u, |
5643 | 2412057331u, 3647886687u, |
5644 | 3110327607u, 1072658422u, |
5645 | 379861934u, 1557579480u, |
5646 | 4124127129u, 2271365865u, |
5647 | 3880613089u, 739218494u, |
5648 | 547346027u, 388559045u, |
5649 | 3147335977u, 176230425u, |
5650 | 3094853730u, 2554321205u, |
5651 | 1495176194u, 4093461535u, |
5652 | 3521297827u, 4108148413u, |
5653 | 1913727929u, 1177947623u, |
5654 | 1911655402u, 1053371241u, |
5655 | 3265708874u, 1266515850u, |
5656 | 1045540427u, 3194420196u, |
5657 | 3717104621u, 1144474110u, |
5658 | 1464392345u, 52070157u, |
5659 | 4144237690u, 3350490823u, |
5660 | 4166253320u, 2747410691u, |
5661 | }; |
5662 | |
5663 | // Return false only if offset is -1 and a spot check of 3 hashes all yield 0. |
5664 | bool Test(int offset, int len = 0) { |
5665 | #undef Check |
5666 | #undef IsAlive |
5667 | |
5668 | #define Check(x) do { \ |
5669 | const uint32_t actual = (x), e = expected[index++]; \ |
5670 | bool ok = actual == e; \ |
5671 | if (!ok) { \ |
5672 | cerr << "expected " << hex << e << " but got " << actual << endl; \ |
5673 | ++errors; \ |
5674 | } \ |
5675 | assert(ok); \ |
5676 | } while (0) |
5677 | |
5678 | #define IsAlive(x) do { alive += IsNonZero(x); } while (0) |
5679 | |
5680 | // After the following line is where the uses of "Check" and such will go. |
5681 | static int index = 0; |
5682 | if (offset == -1) { int alive = 0; { uint64_t h = farmhashna::Hash64WithSeeds(data, len++, SEED0, SEED1); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashna::Hash64WithSeed(data, len++, SEED); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashna::Hash64(data, len++); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } len -= 3; return alive > 0; } |
5683 | { uint64_t h = farmhashna::Hash64WithSeeds(data + offset, len, SEED0, SEED1); Check(h >> 32); Check((h << 32) >> 32); } |
5684 | { uint64_t h = farmhashna::Hash64WithSeed(data + offset, len, SEED); Check(h >> 32); Check((h << 32) >> 32); } |
5685 | { uint64_t h = farmhashna::Hash64(data + offset, len); Check(h >> 32); Check((h << 32) >> 32); } |
5686 | |
5687 | return true; |
5688 | #undef Check |
5689 | #undef IsAlive |
5690 | } |
5691 | |
5692 | int RunTest() { |
5693 | Setup(); |
5694 | int i = 0; |
5695 | cout << "Running farmhashnaTest" ; |
5696 | if (!Test(-1)) { |
5697 | cout << "... Unavailable\n" ; |
5698 | return NoteErrors(); |
5699 | } |
5700 | // Good. The function is attempting to hash, so run the full test. |
5701 | int errors_prior_to_test = errors; |
5702 | for ( ; i < kTestSize - 1; i++) { |
5703 | Test(i * i, i); |
5704 | } |
5705 | for ( ; i < kDataSize; i += i / 7) { |
5706 | Test(0, i); |
5707 | } |
5708 | Test(0, kDataSize); |
5709 | cout << (errors == errors_prior_to_test ? "... OK\n" : "... Failed\n" ); |
5710 | return NoteErrors(); |
5711 | } |
5712 | |
5713 | #else |
5714 | |
5715 | // After the following line is where the code to print hash codes will go. |
5716 | void Dump(int offset, int len) { |
5717 | { uint64_t h = farmhashna::Hash64WithSeeds(data + offset, len, SEED0, SEED1); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
5718 | { uint64_t h = farmhashna::Hash64WithSeed(data + offset, len, SEED); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
5719 | { uint64_t h = farmhashna::Hash64(data + offset, len); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
5720 | } |
5721 | |
5722 | #endif |
5723 | |
5724 | #undef SEED |
5725 | #undef SEED1 |
5726 | #undef SEED0 |
5727 | |
5728 | } // namespace farmhashnaTest |
5729 | |
5730 | #if TESTING |
5731 | |
5732 | static int farmhashnaTestResult = farmhashnaTest::RunTest(); |
5733 | |
5734 | #else |
5735 | int main(int argc, char** argv) { |
5736 | Setup(); |
5737 | cout << "uint32_t expected[] = {\n" ; |
5738 | int i = 0; |
5739 | for ( ; i < kTestSize - 1; i++) { |
5740 | farmhashnaTest::Dump(i * i, i); |
5741 | } |
5742 | for ( ; i < kDataSize; i += i / 7) { |
5743 | farmhashnaTest::Dump(0, i); |
5744 | } |
5745 | farmhashnaTest::Dump(0, kDataSize); |
5746 | cout << "};\n" ; |
5747 | } |
5748 | #endif |
5749 | #ifndef FARMHASH_SELF_TEST_GUARD |
5750 | #define FARMHASH_SELF_TEST_GUARD |
5751 | #include <cstdio> |
5752 | #include <iostream> |
5753 | #include <string.h> |
5754 | |
5755 | using std::cout; |
5756 | using std::cerr; |
5757 | using std::endl; |
5758 | using std::hex; |
5759 | |
5760 | static const uint64_t kSeed0 = 1234567; |
5761 | static const uint64_t kSeed1 = k0; |
5762 | static const int kDataSize = 1 << 20; |
5763 | static const int kTestSize = 300; |
5764 | #define kSeed128 Uint128(kSeed0, kSeed1) |
5765 | |
5766 | static char data[kDataSize]; |
5767 | |
5768 | static int completed_self_tests = 0; |
5769 | static int errors = 0; |
5770 | |
5771 | // Initialize data to pseudorandom values. |
5772 | void Setup() { |
5773 | if (completed_self_tests == 0) { |
5774 | uint64_t a = 9; |
5775 | uint64_t b = 777; |
5776 | for (int i = 0; i < kDataSize; i++) { |
5777 | a += b; |
5778 | b += a; |
5779 | a = (a ^ (a >> 41)) * k0; |
5780 | b = (b ^ (b >> 41)) * k0 + i; |
5781 | uint8_t u = b >> 37; |
5782 | memcpy(data + i, &u, 1); // uint8_t -> char |
5783 | } |
5784 | } |
5785 | } |
5786 | |
5787 | int NoteErrors() { |
5788 | #define NUM_SELF_TESTS 9 |
5789 | if (++completed_self_tests == NUM_SELF_TESTS) |
5790 | std::exit(errors > 0); |
5791 | return errors; |
5792 | } |
5793 | |
5794 | template <typename T> inline bool IsNonZero(T x) { |
5795 | return x != 0; |
5796 | } |
5797 | |
5798 | template <> inline bool IsNonZero<uint128_t>(uint128_t x) { |
5799 | return x != Uint128(0, 0); |
5800 | } |
5801 | |
5802 | #endif // FARMHASH_SELF_TEST_GUARD |
5803 | |
5804 | namespace farmhashntTest { |
5805 | |
5806 | uint32_t CreateSeed(int offset, int salt) { |
5807 | uint32_t h = static_cast<uint32_t>(salt & 0xffffffff); |
5808 | h = h * c1; |
5809 | h ^= (h >> 17); |
5810 | h = h * c1; |
5811 | h ^= (h >> 17); |
5812 | h = h * c1; |
5813 | h ^= (h >> 17); |
5814 | h += static_cast<uint32_t>(offset & 0xffffffff); |
5815 | h = h * c1; |
5816 | h ^= (h >> 17); |
5817 | h = h * c1; |
5818 | h ^= (h >> 17); |
5819 | h = h * c1; |
5820 | h ^= (h >> 17); |
5821 | return h; |
5822 | } |
5823 | |
5824 | #undef SEED |
5825 | #undef SEED1 |
5826 | #undef SEED0 |
5827 | #define SEED CreateSeed(offset, -1) |
5828 | #define SEED0 CreateSeed(offset, 0) |
5829 | #define SEED1 CreateSeed(offset, 1) |
5830 | |
5831 | #undef TESTING |
5832 | #define TESTING 1 |
5833 | #if TESTING |
5834 | uint32_t expected[] = { |
5835 | 2681724312u, |
5836 | 797982799u, |
5837 | 921001710u, |
5838 | 2134990486u, |
5839 | 2244477846u, |
5840 | 2992121793u, |
5841 | 3943596029u, |
5842 | 452431531u, |
5843 | 2557197665u, |
5844 | 2532580744u, |
5845 | 3099673830u, |
5846 | 3696623795u, |
5847 | 3281581178u, |
5848 | 1882212500u, |
5849 | 275903667u, |
5850 | 3033004529u, |
5851 | 1402319660u, |
5852 | 2699376854u, |
5853 | 4222949502u, |
5854 | 1712034059u, |
5855 | 1330324210u, |
5856 | 2921867846u, |
5857 | 1728752234u, |
5858 | 326029180u, |
5859 | 3349570000u, |
5860 | 1612122221u, |
5861 | 1646032583u, |
5862 | 1432476832u, |
5863 | 3552092450u, |
5864 | 1499109081u, |
5865 | 1554038301u, |
5866 | 3190844552u, |
5867 | 540224401u, |
5868 | 489963606u, |
5869 | 1562872448u, |
5870 | 2128624475u, |
5871 | 1262831810u, |
5872 | 1672724608u, |
5873 | 2077310004u, |
5874 | 1911523866u, |
5875 | 294527927u, |
5876 | 1389770549u, |
5877 | 2026137563u, |
5878 | 629449419u, |
5879 | 2489287368u, |
5880 | 645684964u, |
5881 | 230403464u, |
5882 | 3272648435u, |
5883 | 165370827u, |
5884 | 1230085527u, |
5885 | 3628174014u, |
5886 | 851743255u, |
5887 | 1554380634u, |
5888 | 3667013118u, |
5889 | 2290487377u, |
5890 | 1909203251u, |
5891 | 1498556724u, |
5892 | 4165088768u, |
5893 | 197618179u, |
5894 | 914413116u, |
5895 | 1913303225u, |
5896 | 3117299654u, |
5897 | 1357272220u, |
5898 | 507436733u, |
5899 | 1413396341u, |
5900 | 146044391u, |
5901 | 429095991u, |
5902 | 3056862311u, |
5903 | 366414107u, |
5904 | 2293458109u, |
5905 | 1684583131u, |
5906 | 1170404994u, |
5907 | 520792961u, |
5908 | 1577421232u, |
5909 | 4033596884u, |
5910 | 4229339322u, |
5911 | 3242407770u, |
5912 | 2649785113u, |
5913 | 816692935u, |
5914 | 3555213933u, |
5915 | 517646945u, |
5916 | 2180594090u, |
5917 | 3047062993u, |
5918 | 2391606125u, |
5919 | 382936554u, |
5920 | 788479970u, |
5921 | 2826990641u, |
5922 | 3167748333u, |
5923 | 1758123094u, |
5924 | 389974094u, |
5925 | 3338548567u, |
5926 | 2583576230u, |
5927 | 3198590202u, |
5928 | 4155628142u, |
5929 | 542201663u, |
5930 | 2856634168u, |
5931 | 3948351189u, |
5932 | 4194218315u, |
5933 | 1467786451u, |
5934 | 2743592929u, |
5935 | 1062268187u, |
5936 | 3810665822u, |
5937 | 2560479831u, |
5938 | 997658837u, |
5939 | 3067277639u, |
5940 | 1211737169u, |
5941 | 59581167u, |
5942 | 1389679610u, |
5943 | 4189944477u, |
5944 | 100876854u, |
5945 | 2062343506u, |
5946 | 3088828656u, |
5947 | 3284356565u, |
5948 | 3130054947u, |
5949 | 3532596884u, |
5950 | 3887208531u, |
5951 | 259034107u, |
5952 | 3233195759u, |
5953 | 3200749877u, |
5954 | 760633989u, |
5955 | 1115203611u, |
5956 | 1516407838u, |
5957 | 1778459926u, |
5958 | 2146672889u, |
5959 | 2457048126u, |
5960 | 2217471853u, |
5961 | 862072556u, |
5962 | 3745267835u, |
5963 | 701920051u, |
5964 | 581695350u, |
5965 | 1410111809u, |
5966 | 3326135446u, |
5967 | 2187968410u, |
5968 | 4267859263u, |
5969 | 479241367u, |
5970 | 2868987960u, |
5971 | 704325635u, |
5972 | 1418509533u, |
5973 | 735688735u, |
5974 | 3283299459u, |
5975 | 813690332u, |
5976 | 1439630796u, |
5977 | 3195309868u, |
5978 | 1616408198u, |
5979 | 3254795114u, |
5980 | 2799925823u, |
5981 | 3929484338u, |
5982 | 1798536177u, |
5983 | 4205965408u, |
5984 | 1499475160u, |
5985 | 4247675634u, |
5986 | 3779953975u, |
5987 | 785893184u, |
5988 | 2778575413u, |
5989 | 1160134629u, |
5990 | 823113169u, |
5991 | 4116162021u, |
5992 | 4167766971u, |
5993 | 2487440590u, |
5994 | 4004655503u, |
5995 | 4044418876u, |
5996 | 1462554406u, |
5997 | 2011102035u, |
5998 | 4265993528u, |
5999 | 576405853u, |
6000 | 4038839101u, |
6001 | 2425317635u, |
6002 | 1401013391u, |
6003 | 3062418115u, |
6004 | 3167030094u, |
6005 | 2602636307u, |
6006 | 4264167741u, |
6007 | 4017058800u, |
6008 | 1029665228u, |
6009 | 4036354071u, |
6010 | 2670703363u, |
6011 | 688472265u, |
6012 | 1054670286u, |
6013 | 338058159u, |
6014 | 1539305024u, |
6015 | 146827036u, |
6016 | 4060134777u, |
6017 | 2502815838u, |
6018 | 1603444633u, |
6019 | 2448966429u, |
6020 | 3891353218u, |
6021 | 1082330589u, |
6022 | 201837927u, |
6023 | 2848283092u, |
6024 | 883849006u, |
6025 | 1982110346u, |
6026 | 541496720u, |
6027 | 133643215u, |
6028 | 3847827123u, |
6029 | 4015671361u, |
6030 | 2849988118u, |
6031 | 3452457457u, |
6032 | 2102063419u, |
6033 | 3281002516u, |
6034 | 1539151988u, |
6035 | 1147951686u, |
6036 | 2005032160u, |
6037 | 2415262714u, |
6038 | 116647396u, |
6039 | 1029284767u, |
6040 | 2159170082u, |
6041 | 1919171906u, |
6042 | 2017579106u, |
6043 | 2473524405u, |
6044 | 1694443528u, |
6045 | 3671562289u, |
6046 | 505662155u, |
6047 | 1019936943u, |
6048 | 1511077569u, |
6049 | 773792826u, |
6050 | 2089123665u, |
6051 | 484732447u, |
6052 | 1120017626u, |
6053 | 2809286837u, |
6054 | 4029205195u, |
6055 | 1097806406u, |
6056 | 136118734u, |
6057 | 4017075736u, |
6058 | 1403506686u, |
6059 | 1516736273u, |
6060 | 2562064338u, |
6061 | 2984955003u, |
6062 | 3071338162u, |
6063 | 1923531348u, |
6064 | 771592405u, |
6065 | 2586632018u, |
6066 | 4032960199u, |
6067 | 2687561076u, |
6068 | 308584855u, |
6069 | 1692079268u, |
6070 | 2565680167u, |
6071 | 3674576684u, |
6072 | 3770488806u, |
6073 | 69201295u, |
6074 | 1255084262u, |
6075 | 3593730713u, |
6076 | 54945052u, |
6077 | 1939595371u, |
6078 | 2432427547u, |
6079 | 2295501078u, |
6080 | 1280920000u, |
6081 | 82177963u, |
6082 | 1121403845u, |
6083 | 2889101923u, |
6084 | 713121337u, |
6085 | 1747052377u, |
6086 | 927011680u, |
6087 | 4142246789u, |
6088 | 1958963937u, |
6089 | 1636932722u, |
6090 | 4075249328u, |
6091 | 2025886508u, |
6092 | 3026358429u, |
6093 | 1845587644u, |
6094 | 3615577014u, |
6095 | 1363253259u, |
6096 | 3087190425u, |
6097 | 341851980u, |
6098 | 2515339233u, |
6099 | 1276595523u, |
6100 | 460237542u, |
6101 | 4198897105u, |
6102 | 2069753399u, |
6103 | 4278599955u, |
6104 | 356742959u, |
6105 | 3735275001u, |
6106 | 1750561299u, |
6107 | 668829411u, |
6108 | 3384018814u, |
6109 | 4233785523u, |
6110 | 451656820u, |
6111 | 107312677u, |
6112 | 2390172694u, |
6113 | 1216645846u, |
6114 | 164402616u, |
6115 | 1689811113u, |
6116 | 1767810825u, |
6117 | 1397772514u, |
6118 | 3323383489u, |
6119 | 2986430557u, |
6120 | 207428029u, |
6121 | 2260498180u, |
6122 | 2360400900u, |
6123 | 1263709570u, |
6124 | 1377764574u, |
6125 | 4252610345u, |
6126 | 1099809675u, |
6127 | 2776960536u, |
6128 | 3542220540u, |
6129 | 3752806924u, |
6130 | 337070226u, |
6131 | 3267551635u, |
6132 | 1306761320u, |
6133 | 2220373824u, |
6134 | 4109252858u, |
6135 | 896322512u, |
6136 | 1788337208u, |
6137 | 1336556841u, |
6138 | 2911512007u, |
6139 | 3712582785u, |
6140 | 3071359622u, |
6141 | 2561488770u, |
6142 | 3898950547u, |
6143 | 536047554u, |
6144 | 2040551642u, |
6145 | 3528794619u, |
6146 | 3565689036u, |
6147 | 1197100813u, |
6148 | 1864569342u, |
6149 | 3329594980u, |
6150 | 490608221u, |
6151 | 1174785921u, |
6152 | 3287246572u, |
6153 | 2163330264u, |
6154 | 500120236u, |
6155 | 2520062970u, |
6156 | 1561519055u, |
6157 | 4042710240u, |
6158 | 2774151984u, |
6159 | 3160666939u, |
6160 | 96459446u, |
6161 | 1878067032u, |
6162 | 4237425634u, |
6163 | 2952135524u, |
6164 | 4100839753u, |
6165 | 1265237690u, |
6166 | 4246879223u, |
6167 | 834830418u, |
6168 | 3476334357u, |
6169 | 4277111759u, |
6170 | 2511026735u, |
6171 | 3065234219u, |
6172 | 556796152u, |
6173 | 198182691u, |
6174 | 2913077464u, |
6175 | 1535115487u, |
6176 | 4046477658u, |
6177 | 140762681u, |
6178 | 990407433u, |
6179 | 2198985327u, |
6180 | 2926590471u, |
6181 | 559702706u, |
6182 | 82077489u, |
6183 | 1096697687u, |
6184 | 4190838199u, |
6185 | 3046872820u, |
6186 | 1583801700u, |
6187 | 2185339100u, |
6188 | 3912423882u, |
6189 | 3703603898u, |
6190 | 2540185277u, |
6191 | 1446869792u, |
6192 | 4051584612u, |
6193 | 2719373510u, |
6194 | 1675560450u, |
6195 | 1996164093u, |
6196 | 405251683u, |
6197 | 2864244470u, |
6198 | 4071581802u, |
6199 | 2028708916u, |
6200 | 803575837u, |
6201 | 557660441u, |
6202 | 3841480082u, |
6203 | 255451671u, |
6204 | 779434428u, |
6205 | 3452203069u, |
6206 | 2285701422u, |
6207 | 1568745354u, |
6208 | 823305654u, |
6209 | 3184047862u, |
6210 | 4159715581u, |
6211 | 3160134214u, |
6212 | 3198900547u, |
6213 | 1566527339u, |
6214 | 4194096960u, |
6215 | 1496132623u, |
6216 | 1719108984u, |
6217 | 2584236470u, |
6218 | 531310503u, |
6219 | 3456882941u, |
6220 | 3382290593u, |
6221 | 467441309u, |
6222 | 3241407531u, |
6223 | 2540270567u, |
6224 | 1397502982u, |
6225 | 3348545480u, |
6226 | 811750340u, |
6227 | 1017047954u, |
6228 | 2540585554u, |
6229 | 3531646869u, |
6230 | 943914610u, |
6231 | 1903578924u, |
6232 | 1911188923u, |
6233 | 241574049u, |
6234 | 3181425568u, |
6235 | 3529565564u, |
6236 | 240953857u, |
6237 | 2964595704u, |
6238 | 3828377737u, |
6239 | 4260564140u, |
6240 | 4262383425u, |
6241 | 383233885u, |
6242 | 4051263539u, |
6243 | 919677938u, |
6244 | 1683612329u, |
6245 | 4204155962u, |
6246 | 2283918569u, |
6247 | 4153726847u, |
6248 | 350160869u, |
6249 | 1387233546u, |
6250 | 1891558063u, |
6251 | 740563169u, |
6252 | 330624974u, |
6253 | 2948665536u, |
6254 | 376390582u, |
6255 | 3799363969u, |
6256 | 3187805406u, |
6257 | 2263421398u, |
6258 | 1928519266u, |
6259 | 2746577402u, |
6260 | 2108753646u, |
6261 | 768287270u, |
6262 | 2247006571u, |
6263 | 212490675u, |
6264 | 917121602u, |
6265 | 2549835613u, |
6266 | 2864033668u, |
6267 | 3738062408u, |
6268 | 2006922227u, |
6269 | 2616619070u, |
6270 | 3449066284u, |
6271 | 431292293u, |
6272 | 786322314u, |
6273 | 1415970351u, |
6274 | 3263135197u, |
6275 | 2954777083u, |
6276 | 3206261120u, |
6277 | 2287507921u, |
6278 | 1781944746u, |
6279 | 4081586725u, |
6280 | 1109175923u, |
6281 | 1813855658u, |
6282 | 1129462471u, |
6283 | 1037031473u, |
6284 | 3389003793u, |
6285 | 3122687303u, |
6286 | 1164309901u, |
6287 | 3193251135u, |
6288 | 3626554867u, |
6289 | 3071568023u, |
6290 | 3656006011u, |
6291 | 1167681812u, |
6292 | 3155218919u, |
6293 | 2704165015u, |
6294 | 1854985978u, |
6295 | 1712976649u, |
6296 | 878608872u, |
6297 | 4155949943u, |
6298 | 3163786257u, |
6299 | 1626463554u, |
6300 | 1256485167u, |
6301 | 582664250u, |
6302 | 2083771672u, |
6303 | 804336148u, |
6304 | 2770847216u, |
6305 | 1674051445u, |
6306 | 3992583643u, |
6307 | 2966108111u, |
6308 | 900741486u, |
6309 | 4014551783u, |
6310 | 300318232u, |
6311 | 3517585534u, |
6312 | 542270815u, |
6313 | 760762191u, |
6314 | 1216399252u, |
6315 | 643179562u, |
6316 | 3652676161u, |
6317 | 2990167340u, |
6318 | 3262252593u, |
6319 | 2134299399u, |
6320 | 411263051u, |
6321 | 1342880802u, |
6322 | 1967599860u, |
6323 | 853593042u, |
6324 | 2682611693u, |
6325 | 850464484u, |
6326 | 3286110054u, |
6327 | 3842907484u, |
6328 | 3623364733u, |
6329 | 3693536939u, |
6330 | 1615375832u, |
6331 | 2318423400u, |
6332 | 4145497671u, |
6333 | 1728968857u, |
6334 | 2686506989u, |
6335 | 1502282913u, |
6336 | 2151665147u, |
6337 | 3651607391u, |
6338 | 1178454681u, |
6339 | 4146839064u, |
6340 | 2601416506u, |
6341 | 1448097974u, |
6342 | 238887261u, |
6343 | 4093725287u, |
6344 | 2367569534u, |
6345 | 679517009u, |
6346 | 3539886328u, |
6347 | 3086277222u, |
6348 | 1390394371u, |
6349 | 119173722u, |
6350 | 1766260771u, |
6351 | 751439914u, |
6352 | 215917713u, |
6353 | 2656990891u, |
6354 | 1570750352u, |
6355 | 3533987737u, |
6356 | 3576119563u, |
6357 | 963183826u, |
6358 | 3796810515u, |
6359 | 136547246u, |
6360 | 2592925324u, |
6361 | 427154472u, |
6362 | 1228758574u, |
6363 | 1464255968u, |
6364 | 2984611177u, |
6365 | 2001585786u, |
6366 | 1525438381u, |
6367 | 1348536411u, |
6368 | 2861338018u, |
6369 | 764077711u, |
6370 | 3785343245u, |
6371 | 457568934u, |
6372 | 4104954272u, |
6373 | 2381948487u, |
6374 | 3148473363u, |
6375 | 2180270337u, |
6376 | 1387729170u, |
6377 | 951677556u, |
6378 | 2721005055u, |
6379 | 66786703u, |
6380 | 1149351924u, |
6381 | 1895026827u, |
6382 | 3711056516u, |
6383 | 3638638708u, |
6384 | 2263003308u, |
6385 | 3448840877u, |
6386 | 225333538u, |
6387 | 3797521928u, |
6388 | 3262952567u, |
6389 | 2078619498u, |
6390 | 1178073973u, |
6391 | 3288261538u, |
6392 | 1496966875u, |
6393 | 2481012988u, |
6394 | 114945840u, |
6395 | 1632780103u, |
6396 | 2087949619u, |
6397 | 3787017905u, |
6398 | 2575395164u, |
6399 | 2971726178u, |
6400 | 3642087909u, |
6401 | 3894199764u, |
6402 | 203853421u, |
6403 | 425935223u, |
6404 | 3565833278u, |
6405 | 1748785729u, |
6406 | 580966986u, |
6407 | 2124704694u, |
6408 | 1107045577u, |
6409 | 1067532701u, |
6410 | 1406028344u, |
6411 | 18613994u, |
6412 | 3476683808u, |
6413 | 3762914298u, |
6414 | 1844996900u, |
6415 | 904215228u, |
6416 | 1118521573u, |
6417 | 3657647605u, |
6418 | 3136157065u, |
6419 | 2287683323u, |
6420 | 126005630u, |
6421 | 3555092974u, |
6422 | 49515858u, |
6423 | 1010661841u, |
6424 | 1902040126u, |
6425 | 1400735275u, |
6426 | 2771676666u, |
6427 | 2225229957u, |
6428 | 3454177594u, |
6429 | 2883475137u, |
6430 | 4144472319u, |
6431 | 1051332394u, |
6432 | 542648229u, |
6433 | 1669710469u, |
6434 | 553041029u, |
6435 | 584127807u, |
6436 | 2993670925u, |
6437 | 3587959456u, |
6438 | 1745399498u, |
6439 | 1404723176u, |
6440 | 1334333531u, |
6441 | 3239516985u, |
6442 | 1275954779u, |
6443 | 367320647u, |
6444 | 3684418197u, |
6445 | 4030809053u, |
6446 | 484559105u, |
6447 | 4255931645u, |
6448 | 4271715616u, |
6449 | 3171911678u, |
6450 | 928543347u, |
6451 | 2159512867u, |
6452 | 313902234u, |
6453 | 647086234u, |
6454 | 577214736u, |
6455 | 1130129573u, |
6456 | 995791646u, |
6457 | 1645086060u, |
6458 | 4122335794u, |
6459 | 1064648931u, |
6460 | 2752145076u, |
6461 | 3312498873u, |
6462 | 4238535494u, |
6463 | 1471227427u, |
6464 | 633688562u, |
6465 | 1959779970u, |
6466 | 766642813u, |
6467 | 1380896111u, |
6468 | 3647601207u, |
6469 | 1733961041u, |
6470 | 521947915u, |
6471 | 189164145u, |
6472 | 486382294u, |
6473 | 3770038872u, |
6474 | 3235740744u, |
6475 | 1912506671u, |
6476 | 2276864677u, |
6477 | 1588060152u, |
6478 | 2504457929u, |
6479 | 1471020554u, |
6480 | 3623212998u, |
6481 | 3026631806u, |
6482 | 2342164722u, |
6483 | 1674890530u, |
6484 | 3011542850u, |
6485 | 3549160092u, |
6486 | 4290680005u, |
6487 | 3943068002u, |
6488 | 2273781461u, |
6489 | 2127663659u, |
6490 | 1646681121u, |
6491 | 447810651u, |
6492 | 2366308558u, |
6493 | 970504950u, |
6494 | 2008155560u, |
6495 | 2695940969u, |
6496 | 3444688454u, |
6497 | 1739318893u, |
6498 | 2683090634u, |
6499 | 2774816580u, |
6500 | 437560100u, |
6501 | 512012738u, |
6502 | 3305170944u, |
6503 | 665292744u, |
6504 | 3580039116u, |
6505 | 1579404983u, |
6506 | 3397891494u, |
6507 | 710590371u, |
6508 | 2514565805u, |
6509 | 3624609754u, |
6510 | 3516075816u, |
6511 | 1314000850u, |
6512 | 1935166880u, |
6513 | 3257747610u, |
6514 | 3776931214u, |
6515 | 3183054185u, |
6516 | 675129307u, |
6517 | 3333261712u, |
6518 | 1154611403u, |
6519 | 2759854023u, |
6520 | 1963228038u, |
6521 | 505138315u, |
6522 | 1803966773u, |
6523 | 4032705384u, |
6524 | 798395739u, |
6525 | 3473799845u, |
6526 | 476400898u, |
6527 | 602972493u, |
6528 | 3289878097u, |
6529 | 2520311409u, |
6530 | 3214794876u, |
6531 | 748160407u, |
6532 | 1326769504u, |
6533 | 902775872u, |
6534 | 1372805534u, |
6535 | 1213925114u, |
6536 | 3009384989u, |
6537 | 3781981134u, |
6538 | 2835608783u, |
6539 | 2716786748u, |
6540 | 1669490957u, |
6541 | 1089334066u, |
6542 | 250756920u, |
6543 | 4041016629u, |
6544 | 2495807367u, |
6545 | 2008251381u, |
6546 | 106212622u, |
6547 | 1927268995u, |
6548 | 2251978818u, |
6549 | 3788056262u, |
6550 | 3678660147u, |
6551 | 2656772270u, |
6552 | 1997584981u, |
6553 | 2668998785u, |
6554 | 2954162084u, |
6555 | 845687881u, |
6556 | 776018378u, |
6557 | 2066910012u, |
6558 | 918315064u, |
6559 | }; |
6560 | |
6561 | // Return false only if offset is -1 and a spot check of 3 hashes all yield 0. |
6562 | bool Test(int offset, int len = 0) { |
6563 | #undef Check |
6564 | #undef IsAlive |
6565 | |
6566 | #define Check(x) do { \ |
6567 | const uint32_t actual = (x), e = expected[index++]; \ |
6568 | bool ok = actual == e; \ |
6569 | if (!ok) { \ |
6570 | cerr << "expected " << hex << e << " but got " << actual << endl; \ |
6571 | ++errors; \ |
6572 | } \ |
6573 | assert(ok); \ |
6574 | } while (0) |
6575 | |
6576 | #define IsAlive(x) do { alive += IsNonZero(x); } while (0) |
6577 | |
6578 | // After the following line is where the uses of "Check" and such will go. |
6579 | static int index = 0; |
6580 | if (offset == -1) { int alive = 0; IsAlive(farmhashnt::Hash32WithSeed(data, len++, SEED)); IsAlive(farmhashnt::Hash32(data, len++)); IsAlive(farmhashnt::Hash32(data, len++)); len -= 3; return alive > 0; } |
6581 | Check(farmhashnt::Hash32WithSeed(data + offset, len, SEED)); |
6582 | Check(farmhashnt::Hash32(data + offset, len)); |
6583 | |
6584 | return true; |
6585 | #undef Check |
6586 | #undef IsAlive |
6587 | } |
6588 | |
6589 | int RunTest() { |
6590 | Setup(); |
6591 | int i = 0; |
6592 | cout << "Running farmhashntTest" ; |
6593 | if (!Test(-1)) { |
6594 | cout << "... Unavailable\n" ; |
6595 | return NoteErrors(); |
6596 | } |
6597 | // Good. The function is attempting to hash, so run the full test. |
6598 | int errors_prior_to_test = errors; |
6599 | for ( ; i < kTestSize - 1; i++) { |
6600 | Test(i * i, i); |
6601 | } |
6602 | for ( ; i < kDataSize; i += i / 7) { |
6603 | Test(0, i); |
6604 | } |
6605 | Test(0, kDataSize); |
6606 | cout << (errors == errors_prior_to_test ? "... OK\n" : "... Failed\n" ); |
6607 | return NoteErrors(); |
6608 | } |
6609 | |
6610 | #else |
6611 | |
6612 | // After the following line is where the code to print hash codes will go. |
6613 | void Dump(int offset, int len) { |
6614 | cout << farmhashnt::Hash32WithSeed(data + offset, len, SEED) << "u," << endl; |
6615 | cout << farmhashnt::Hash32(data + offset, len) << "u," << endl; |
6616 | } |
6617 | |
6618 | #endif |
6619 | |
6620 | #undef SEED |
6621 | #undef SEED1 |
6622 | #undef SEED0 |
6623 | |
6624 | } // namespace farmhashntTest |
6625 | |
6626 | #if TESTING |
6627 | |
6628 | static int farmhashntTestResult = farmhashntTest::RunTest(); |
6629 | |
6630 | #else |
6631 | int main(int argc, char** argv) { |
6632 | Setup(); |
6633 | cout << "uint32_t expected[] = {\n" ; |
6634 | int i = 0; |
6635 | for ( ; i < kTestSize - 1; i++) { |
6636 | farmhashntTest::Dump(i * i, i); |
6637 | } |
6638 | for ( ; i < kDataSize; i += i / 7) { |
6639 | farmhashntTest::Dump(0, i); |
6640 | } |
6641 | farmhashntTest::Dump(0, kDataSize); |
6642 | cout << "};\n" ; |
6643 | } |
6644 | #endif |
6645 | #ifndef FARMHASH_SELF_TEST_GUARD |
6646 | #define FARMHASH_SELF_TEST_GUARD |
6647 | #include <cstdio> |
6648 | #include <iostream> |
6649 | #include <string.h> |
6650 | |
6651 | using std::cout; |
6652 | using std::cerr; |
6653 | using std::endl; |
6654 | using std::hex; |
6655 | |
6656 | static const uint64_t kSeed0 = 1234567; |
6657 | static const uint64_t kSeed1 = k0; |
6658 | static const int kDataSize = 1 << 20; |
6659 | static const int kTestSize = 300; |
6660 | #define kSeed128 Uint128(kSeed0, kSeed1) |
6661 | |
6662 | static char data[kDataSize]; |
6663 | |
6664 | static int completed_self_tests = 0; |
6665 | static int errors = 0; |
6666 | |
6667 | // Initialize data to pseudorandom values. |
6668 | void Setup() { |
6669 | if (completed_self_tests == 0) { |
6670 | uint64_t a = 9; |
6671 | uint64_t b = 777; |
6672 | for (int i = 0; i < kDataSize; i++) { |
6673 | a += b; |
6674 | b += a; |
6675 | a = (a ^ (a >> 41)) * k0; |
6676 | b = (b ^ (b >> 41)) * k0 + i; |
6677 | uint8_t u = b >> 37; |
6678 | memcpy(data + i, &u, 1); // uint8_t -> char |
6679 | } |
6680 | } |
6681 | } |
6682 | |
6683 | int NoteErrors() { |
6684 | #define NUM_SELF_TESTS 9 |
6685 | if (++completed_self_tests == NUM_SELF_TESTS) |
6686 | std::exit(errors > 0); |
6687 | return errors; |
6688 | } |
6689 | |
6690 | template <typename T> inline bool IsNonZero(T x) { |
6691 | return x != 0; |
6692 | } |
6693 | |
6694 | template <> inline bool IsNonZero<uint128_t>(uint128_t x) { |
6695 | return x != Uint128(0, 0); |
6696 | } |
6697 | |
6698 | #endif // FARMHASH_SELF_TEST_GUARD |
6699 | |
6700 | namespace farmhashsaTest { |
6701 | |
6702 | uint32_t CreateSeed(int offset, int salt) { |
6703 | uint32_t h = static_cast<uint32_t>(salt & 0xffffffff); |
6704 | h = h * c1; |
6705 | h ^= (h >> 17); |
6706 | h = h * c1; |
6707 | h ^= (h >> 17); |
6708 | h = h * c1; |
6709 | h ^= (h >> 17); |
6710 | h += static_cast<uint32_t>(offset & 0xffffffff); |
6711 | h = h * c1; |
6712 | h ^= (h >> 17); |
6713 | h = h * c1; |
6714 | h ^= (h >> 17); |
6715 | h = h * c1; |
6716 | h ^= (h >> 17); |
6717 | return h; |
6718 | } |
6719 | |
6720 | #undef SEED |
6721 | #undef SEED1 |
6722 | #undef SEED0 |
6723 | #define SEED CreateSeed(offset, -1) |
6724 | #define SEED0 CreateSeed(offset, 0) |
6725 | #define SEED1 CreateSeed(offset, 1) |
6726 | |
6727 | #undef TESTING |
6728 | #define TESTING 1 |
6729 | #if TESTING |
6730 | uint32_t expected[] = { |
6731 | 4223616069u, |
6732 | 3696677242u, |
6733 | 4081014168u, |
6734 | 2576519988u, |
6735 | 2212771159u, |
6736 | 1112731063u, |
6737 | 1020067935u, |
6738 | 3955445564u, |
6739 | 1451961420u, |
6740 | 653440099u, |
6741 | 31917516u, |
6742 | 2957164615u, |
6743 | 2590087362u, |
6744 | 3879448744u, |
6745 | 176305566u, |
6746 | 2447367541u, |
6747 | 1359016305u, |
6748 | 3363804638u, |
6749 | 1117290165u, |
6750 | 1062549743u, |
6751 | 2437877004u, |
6752 | 1894455839u, |
6753 | 673206794u, |
6754 | 3486923651u, |
6755 | 3269862919u, |
6756 | 2303349487u, |
6757 | 1380660650u, |
6758 | 595525107u, |
6759 | 1525325287u, |
6760 | 2025609358u, |
6761 | 176408838u, |
6762 | 1592885012u, |
6763 | 864896482u, |
6764 | 2101378090u, |
6765 | 3489229104u, |
6766 | 2118965695u, |
6767 | 581644891u, |
6768 | 2718789079u, |
6769 | 631613207u, |
6770 | 4228658372u, |
6771 | 3867875546u, |
6772 | 3531368319u, |
6773 | 3804516756u, |
6774 | 3317755099u, |
6775 | 1619744564u, |
6776 | 2884717286u, |
6777 | 1088213445u, |
6778 | 2667691076u, |
6779 | 3727873235u, |
6780 | 2330406762u, |
6781 | 858590707u, |
6782 | 123802208u, |
6783 | 4150036245u, |
6784 | 182283099u, |
6785 | 1478882570u, |
6786 | 3282617403u, |
6787 | 819171187u, |
6788 | 1172627392u, |
6789 | 4254302102u, |
6790 | 2957028020u, |
6791 | 437030323u, |
6792 | 2452147680u, |
6793 | 2868246750u, |
6794 | 3530169402u, |
6795 | 3154852132u, |
6796 | 215019192u, |
6797 | 357580983u, |
6798 | 1354454461u, |
6799 | 1108813287u, |
6800 | 2324008118u, |
6801 | 2315997713u, |
6802 | 4181601562u, |
6803 | 1360882441u, |
6804 | 92423273u, |
6805 | 3048866755u, |
6806 | 3369188505u, |
6807 | 3664371439u, |
6808 | 2920710428u, |
6809 | 1027891570u, |
6810 | 2653166430u, |
6811 | 3461888315u, |
6812 | 1475780447u, |
6813 | 292769636u, |
6814 | 1737473313u, |
6815 | 4064110516u, |
6816 | 4170160075u, |
6817 | 762850927u, |
6818 | 3630603695u, |
6819 | 2803307356u, |
6820 | 844987665u, |
6821 | 460980967u, |
6822 | 3005635467u, |
6823 | 2802568977u, |
6824 | 588668033u, |
6825 | 2148940781u, |
6826 | 3239099984u, |
6827 | 1266953698u, |
6828 | 3197808789u, |
6829 | 3519942533u, |
6830 | 2511995334u, |
6831 | 2553810188u, |
6832 | 871667697u, |
6833 | 1358675720u, |
6834 | 1499319171u, |
6835 | 2044931270u, |
6836 | 1210355103u, |
6837 | 807152540u, |
6838 | 3262320756u, |
6839 | 2810214575u, |
6840 | 1813386141u, |
6841 | 4089465863u, |
6842 | 903928165u, |
6843 | 1388899322u, |
6844 | 3209183659u, |
6845 | 834536144u, |
6846 | 2733354550u, |
6847 | 2742289921u, |
6848 | 3689042563u, |
6849 | 2655593281u, |
6850 | 4169686303u, |
6851 | 415985561u, |
6852 | 138892376u, |
6853 | 516115393u, |
6854 | 65683883u, |
6855 | 4162865100u, |
6856 | 889944635u, |
6857 | 313566528u, |
6858 | 3346420907u, |
6859 | 1504303591u, |
6860 | 2256809275u, |
6861 | 742243229u, |
6862 | 779775302u, |
6863 | 3140940172u, |
6864 | 2312556111u, |
6865 | 2304095772u, |
6866 | 1151741606u, |
6867 | 2194712422u, |
6868 | 1714084652u, |
6869 | 3272736835u, |
6870 | 1311540658u, |
6871 | 191179665u, |
6872 | 3996605106u, |
6873 | 1657345233u, |
6874 | 4205442903u, |
6875 | 1553339212u, |
6876 | 2351843044u, |
6877 | 1647502006u, |
6878 | 2525516233u, |
6879 | 292202846u, |
6880 | 1498646290u, |
6881 | 1429323381u, |
6882 | 974274898u, |
6883 | 3759331561u, |
6884 | 2881238887u, |
6885 | 826787221u, |
6886 | 1069622448u, |
6887 | 221991032u, |
6888 | 1462969082u, |
6889 | 2799661508u, |
6890 | 364022781u, |
6891 | 2594244377u, |
6892 | 797773898u, |
6893 | 4097839290u, |
6894 | 1529150125u, |
6895 | 2456805570u, |
6896 | 541503425u, |
6897 | 3936326142u, |
6898 | 3112719954u, |
6899 | 775223581u, |
6900 | 3074018423u, |
6901 | 3198488875u, |
6902 | 1772191849u, |
6903 | 2456535211u, |
6904 | 3154686028u, |
6905 | 1520862019u, |
6906 | 4005829426u, |
6907 | 1306433767u, |
6908 | 1943028506u, |
6909 | 2246000782u, |
6910 | 1057766454u, |
6911 | 3761996982u, |
6912 | 3441075333u, |
6913 | 898641979u, |
6914 | 3450209088u, |
6915 | 3941329307u, |
6916 | 3289922449u, |
6917 | 3085075827u, |
6918 | 1814193220u, |
6919 | 690422997u, |
6920 | 2627846676u, |
6921 | 2653520704u, |
6922 | 3739145533u, |
6923 | 3996776010u, |
6924 | 2287072592u, |
6925 | 1346671698u, |
6926 | 3082629900u, |
6927 | 2298811274u, |
6928 | 3639722036u, |
6929 | 1729419228u, |
6930 | 1836765953u, |
6931 | 3708118742u, |
6932 | 213436u, |
6933 | 950223749u, |
6934 | 3734247682u, |
6935 | 2924575678u, |
6936 | 1382024841u, |
6937 | 2431637732u, |
6938 | 3448846682u, |
6939 | 1341301397u, |
6940 | 4206956590u, |
6941 | 1730650902u, |
6942 | 2581075456u, |
6943 | 1542359141u, |
6944 | 707222542u, |
6945 | 2925350541u, |
6946 | 3846303536u, |
6947 | 3579103295u, |
6948 | 3932175763u, |
6949 | 1339615732u, |
6950 | 848825750u, |
6951 | 1070170828u, |
6952 | 1964973818u, |
6953 | 577060344u, |
6954 | 607721296u, |
6955 | 4031023048u, |
6956 | 406883794u, |
6957 | 3991905552u, |
6958 | 1198544082u, |
6959 | 872468460u, |
6960 | 1044847096u, |
6961 | 3159976313u, |
6962 | 3020028266u, |
6963 | 2108700400u, |
6964 | 3373767922u, |
6965 | 264431841u, |
6966 | 2817097007u, |
6967 | 3700061048u, |
6968 | 1733731531u, |
6969 | 3459415893u, |
6970 | 80378591u, |
6971 | 1479875104u, |
6972 | 19735612u, |
6973 | 1382658977u, |
6974 | 3416562245u, |
6975 | 1959852842u, |
6976 | 2384002344u, |
6977 | 124683828u, |
6978 | 3725782174u, |
6979 | 2300301222u, |
6980 | 393852269u, |
6981 | 1302492002u, |
6982 | 3623776492u, |
6983 | 3787086417u, |
6984 | 1730024749u, |
6985 | 1710531361u, |
6986 | 443700716u, |
6987 | 1461987482u, |
6988 | 671998131u, |
6989 | 3018380746u, |
6990 | 2592292305u, |
6991 | 3390799372u, |
6992 | 3945101155u, |
6993 | 3743494852u, |
6994 | 3716045582u, |
6995 | 996005166u, |
6996 | 320698449u, |
6997 | 3420221765u, |
6998 | 1518157951u, |
6999 | 2555810666u, |
7000 | 3381929684u, |
7001 | 2019638523u, |
7002 | 3088262796u, |
7003 | 2072178906u, |
7004 | 3433649364u, |
7005 | 203906916u, |
7006 | 34663784u, |
7007 | 290301305u, |
7008 | 1188021504u, |
7009 | 3754681145u, |
7010 | 3920313139u, |
7011 | 2840496520u, |
7012 | 1656802962u, |
7013 | 2288475489u, |
7014 | 3399185138u, |
7015 | 1296000826u, |
7016 | 2362384746u, |
7017 | 309633360u, |
7018 | 2719851778u, |
7019 | 776035930u, |
7020 | 3200733043u, |
7021 | 365690832u, |
7022 | 3326378243u, |
7023 | 1500331457u, |
7024 | 1625708592u, |
7025 | 4230903462u, |
7026 | 715344888u, |
7027 | 3363777768u, |
7028 | 2243620288u, |
7029 | 2890765789u, |
7030 | 553154234u, |
7031 | 4044100108u, |
7032 | 4056887320u, |
7033 | 1185656496u, |
7034 | 3671476744u, |
7035 | 1064586897u, |
7036 | 1154949698u, |
7037 | 3493481974u, |
7038 | 1294573722u, |
7039 | 1869224012u, |
7040 | 2530084956u, |
7041 | 995321553u, |
7042 | 833419249u, |
7043 | 563815282u, |
7044 | 250258043u, |
7045 | 2970801822u, |
7046 | 441007535u, |
7047 | 42246961u, |
7048 | 2820426655u, |
7049 | 2878882436u, |
7050 | 2363245780u, |
7051 | 2138489282u, |
7052 | 2972360481u, |
7053 | 2312619393u, |
7054 | 3598664848u, |
7055 | 3071556076u, |
7056 | 776990325u, |
7057 | 3220427357u, |
7058 | 2257939577u, |
7059 | 3817305903u, |
7060 | 1502979698u, |
7061 | 3159755934u, |
7062 | 3955997276u, |
7063 | 2423850008u, |
7064 | 1959927572u, |
7065 | 1219782288u, |
7066 | 4119776679u, |
7067 | 1124253854u, |
7068 | 3678052422u, |
7069 | 2620644947u, |
7070 | 1262408666u, |
7071 | 3480072280u, |
7072 | 2627137665u, |
7073 | 807538749u, |
7074 | 3276646337u, |
7075 | 518510128u, |
7076 | 1137828655u, |
7077 | 1498449110u, |
7078 | 3031692317u, |
7079 | 1125635969u, |
7080 | 1130096111u, |
7081 | 780007336u, |
7082 | 3111856399u, |
7083 | 1014917264u, |
7084 | 780877352u, |
7085 | 2909458336u, |
7086 | 4235949214u, |
7087 | 2423879289u, |
7088 | 275888892u, |
7089 | 3891926795u, |
7090 | 3538163953u, |
7091 | 54815161u, |
7092 | 162228302u, |
7093 | 258154068u, |
7094 | 3554455591u, |
7095 | 1801469029u, |
7096 | 2801563220u, |
7097 | 726560058u, |
7098 | 2450221940u, |
7099 | 3677582978u, |
7100 | 440993800u, |
7101 | 424762443u, |
7102 | 2624525253u, |
7103 | 2587715329u, |
7104 | 2292264424u, |
7105 | 1074856749u, |
7106 | 3294752007u, |
7107 | 3164112672u, |
7108 | 2399146799u, |
7109 | 1920182465u, |
7110 | 3858835361u, |
7111 | 193755240u, |
7112 | 3333610311u, |
7113 | 1757504059u, |
7114 | 2576027039u, |
7115 | 2775253365u, |
7116 | 2939191561u, |
7117 | 1046147275u, |
7118 | 235149906u, |
7119 | 4262218222u, |
7120 | 2900542726u, |
7121 | 2260154702u, |
7122 | 1019551635u, |
7123 | 1194720570u, |
7124 | 3519118691u, |
7125 | 3039483153u, |
7126 | 84918216u, |
7127 | 3053381097u, |
7128 | 2572396843u, |
7129 | 3849763371u, |
7130 | 2782686780u, |
7131 | 3710049554u, |
7132 | 3403430713u, |
7133 | 2346080784u, |
7134 | 2496307442u, |
7135 | 1597281872u, |
7136 | 696018239u, |
7137 | 704625714u, |
7138 | 623026921u, |
7139 | 3182413559u, |
7140 | 3794540330u, |
7141 | 305497722u, |
7142 | 1592680199u, |
7143 | 2377854072u, |
7144 | 3060601746u, |
7145 | 3953057908u, |
7146 | 3941551588u, |
7147 | 1033716182u, |
7148 | 2765716854u, |
7149 | 1309699058u, |
7150 | 3519400181u, |
7151 | 3073370877u, |
7152 | 115583008u, |
7153 | 4032909296u, |
7154 | 2944563574u, |
7155 | 3762753718u, |
7156 | 192842727u, |
7157 | 1711348701u, |
7158 | 3086147235u, |
7159 | 1658229443u, |
7160 | 1479783872u, |
7161 | 3839977157u, |
7162 | 225619117u, |
7163 | 1349684817u, |
7164 | 1964813173u, |
7165 | 565753187u, |
7166 | 2530252046u, |
7167 | 840014353u, |
7168 | 1645183704u, |
7169 | 3668429078u, |
7170 | 3438418557u, |
7171 | 639704059u, |
7172 | 360837811u, |
7173 | 2531807958u, |
7174 | 1572353913u, |
7175 | 2116037299u, |
7176 | 1948437512u, |
7177 | 744553393u, |
7178 | 2380697034u, |
7179 | 3775234105u, |
7180 | 3816065157u, |
7181 | 301868653u, |
7182 | 2960939561u, |
7183 | 3306528247u, |
7184 | 2389296549u, |
7185 | 805918610u, |
7186 | 1759358265u, |
7187 | 1760876328u, |
7188 | 2827601706u, |
7189 | 2944594708u, |
7190 | 3313666458u, |
7191 | 2022601495u, |
7192 | 730938791u, |
7193 | 193539397u, |
7194 | 2026103244u, |
7195 | 802928398u, |
7196 | 2630934308u, |
7197 | 782805818u, |
7198 | 3499326016u, |
7199 | 293509489u, |
7200 | 3646131514u, |
7201 | 3182478647u, |
7202 | 854800333u, |
7203 | 2284531628u, |
7204 | 438528022u, |
7205 | 2339298129u, |
7206 | 1692289216u, |
7207 | 2427728723u, |
7208 | 46501288u, |
7209 | 350652353u, |
7210 | 1355971222u, |
7211 | 889682372u, |
7212 | 944799254u, |
7213 | 2763906061u, |
7214 | 2807550612u, |
7215 | 2683762637u, |
7216 | 100870317u, |
7217 | 2449357318u, |
7218 | 2638348436u, |
7219 | 4206088869u, |
7220 | 1788948473u, |
7221 | 3537588549u, |
7222 | 2782490204u, |
7223 | 134406470u, |
7224 | 2409190528u, |
7225 | 2362439849u, |
7226 | 1861661528u, |
7227 | 2101513194u, |
7228 | 1424834765u, |
7229 | 3581765745u, |
7230 | 3185999525u, |
7231 | 2057487100u, |
7232 | 2303941176u, |
7233 | 3639628788u, |
7234 | 1180265315u, |
7235 | 230437935u, |
7236 | 2108319366u, |
7237 | 1131685143u, |
7238 | 1055685292u, |
7239 | 1509007009u, |
7240 | 1258485140u, |
7241 | 560525005u, |
7242 | 3598799040u, |
7243 | 3835680585u, |
7244 | 1851859628u, |
7245 | 332858996u, |
7246 | 641769248u, |
7247 | 4252450037u, |
7248 | 865386707u, |
7249 | 720719117u, |
7250 | 3133612164u, |
7251 | 3833045874u, |
7252 | 3492515435u, |
7253 | 2465970289u, |
7254 | 4234420011u, |
7255 | 573859916u, |
7256 | 252532886u, |
7257 | 870392318u, |
7258 | 4051320920u, |
7259 | 894929092u, |
7260 | 3748361688u, |
7261 | 699355960u, |
7262 | 1885212350u, |
7263 | 1609756949u, |
7264 | 461896870u, |
7265 | 1337065461u, |
7266 | 1775211059u, |
7267 | 1786193749u, |
7268 | 2815154643u, |
7269 | 2128729882u, |
7270 | 969639529u, |
7271 | 3960427545u, |
7272 | 859416958u, |
7273 | 2739758802u, |
7274 | 2698032197u, |
7275 | 2813292418u, |
7276 | 1985467524u, |
7277 | 396604317u, |
7278 | 4122172759u, |
7279 | 1201259789u, |
7280 | 4282051702u, |
7281 | 3270018895u, |
7282 | 961215209u, |
7283 | 961075860u, |
7284 | 4211926998u, |
7285 | 4088374597u, |
7286 | 577510509u, |
7287 | 3058349487u, |
7288 | 4025377754u, |
7289 | 2815478438u, |
7290 | 471023164u, |
7291 | 3947959608u, |
7292 | 4161486934u, |
7293 | 2299888461u, |
7294 | 1103571511u, |
7295 | 2450153872u, |
7296 | 1839939275u, |
7297 | 108299608u, |
7298 | 858086440u, |
7299 | 1030152945u, |
7300 | 3895328530u, |
7301 | 3009080718u, |
7302 | 3690840454u, |
7303 | 3847025277u, |
7304 | 152331362u, |
7305 | 161365689u, |
7306 | 831319961u, |
7307 | 2166017294u, |
7308 | 3945322722u, |
7309 | 4059970216u, |
7310 | 1420824131u, |
7311 | 2770648308u, |
7312 | 1567250186u, |
7313 | 2181067149u, |
7314 | 1939743488u, |
7315 | 3080158120u, |
7316 | 3435218248u, |
7317 | 2495237495u, |
7318 | 3814085102u, |
7319 | 3180983013u, |
7320 | 3199054292u, |
7321 | 2204745908u, |
7322 | 1140337267u, |
7323 | 2213569784u, |
7324 | 1941879842u, |
7325 | 2105562605u, |
7326 | 3618835614u, |
7327 | 2247103645u, |
7328 | 2492473487u, |
7329 | 856414299u, |
7330 | 166022030u, |
7331 | 4080104712u, |
7332 | 3218935344u, |
7333 | 3284220561u, |
7334 | 4261581452u, |
7335 | 1206944836u, |
7336 | 3496705432u, |
7337 | 2215996876u, |
7338 | 3154627465u, |
7339 | 3384005496u, |
7340 | 742170556u, |
7341 | 1333047620u, |
7342 | 802680366u, |
7343 | 156833431u, |
7344 | 2682100354u, |
7345 | 2493654830u, |
7346 | 584848366u, |
7347 | 1691693131u, |
7348 | 2169934170u, |
7349 | 779968026u, |
7350 | 2099545800u, |
7351 | 1423039695u, |
7352 | 4292110968u, |
7353 | 4266576788u, |
7354 | 149142597u, |
7355 | 748501873u, |
7356 | 3865014822u, |
7357 | 1913588198u, |
7358 | 130285614u, |
7359 | 3500768879u, |
7360 | 915458923u, |
7361 | 3071792750u, |
7362 | 1339986633u, |
7363 | 4143929149u, |
7364 | 4048379479u, |
7365 | 725193827u, |
7366 | 1375113643u, |
7367 | 2425277412u, |
7368 | 4144659274u, |
7369 | 465714768u, |
7370 | 226991589u, |
7371 | 2212127704u, |
7372 | 3936145258u, |
7373 | 2891024846u, |
7374 | 3816000225u, |
7375 | 979331165u, |
7376 | 1749907536u, |
7377 | 53847318u, |
7378 | 1462525833u, |
7379 | 2961425455u, |
7380 | 368859113u, |
7381 | 3572721452u, |
7382 | 453048644u, |
7383 | 1628629918u, |
7384 | 3497673923u, |
7385 | 3619079585u, |
7386 | 139870565u, |
7387 | 1518176798u, |
7388 | 3933074281u, |
7389 | 1878623729u, |
7390 | 2074035641u, |
7391 | 3016759257u, |
7392 | 1313053591u, |
7393 | 2557706970u, |
7394 | 2348296582u, |
7395 | 962370022u, |
7396 | 2337285014u, |
7397 | 1618936717u, |
7398 | 1915877085u, |
7399 | 2743743122u, |
7400 | 3250783882u, |
7401 | 1346652536u, |
7402 | 143311109u, |
7403 | 2443788461u, |
7404 | 1048248964u, |
7405 | 2806619339u, |
7406 | 3263266976u, |
7407 | 1668146349u, |
7408 | 3397428868u, |
7409 | 3276188862u, |
7410 | 1774196343u, |
7411 | 1993847813u, |
7412 | 2771079610u, |
7413 | 476672419u, |
7414 | 2119050359u, |
7415 | 2918326659u, |
7416 | 2245402721u, |
7417 | 2692910474u, |
7418 | 2374383269u, |
7419 | 342400227u, |
7420 | 2961437795u, |
7421 | 3899230368u, |
7422 | 337787132u, |
7423 | 3664444935u, |
7424 | 1269451153u, |
7425 | 2971526729u, |
7426 | 1486511182u, |
7427 | 791070133u, |
7428 | 2570319890u, |
7429 | 3482497490u, |
7430 | 2134230518u, |
7431 | 4273391202u, |
7432 | 1825511330u, |
7433 | 3947753714u, |
7434 | 1389755724u, |
7435 | 3995075516u, |
7436 | 2081052615u, |
7437 | 3626343470u, |
7438 | 4213603435u, |
7439 | 2137917278u, |
7440 | 2898987303u, |
7441 | 3059215715u, |
7442 | 3383237881u, |
7443 | 3003674434u, |
7444 | 409174425u, |
7445 | 1911915604u, |
7446 | 2087728055u, |
7447 | 2942005882u, |
7448 | 3386522440u, |
7449 | 714936074u, |
7450 | 261924004u, |
7451 | 3268784033u, |
7452 | 1141188757u, |
7453 | 2413217552u, |
7454 | 1515163433u, |
7455 | }; |
7456 | |
7457 | // Return false only if offset is -1 and a spot check of 3 hashes all yield 0. |
7458 | bool Test(int offset, int len = 0) { |
7459 | #undef Check |
7460 | #undef IsAlive |
7461 | |
7462 | #define Check(x) do { \ |
7463 | const uint32_t actual = (x), e = expected[index++]; \ |
7464 | bool ok = actual == e; \ |
7465 | if (!ok) { \ |
7466 | cerr << "expected " << hex << e << " but got " << actual << endl; \ |
7467 | ++errors; \ |
7468 | } \ |
7469 | assert(ok); \ |
7470 | } while (0) |
7471 | |
7472 | #define IsAlive(x) do { alive += IsNonZero(x); } while (0) |
7473 | |
7474 | // After the following line is where the uses of "Check" and such will go. |
7475 | static int index = 0; |
7476 | if (offset == -1) { int alive = 0; IsAlive(farmhashsa::Hash32WithSeed(data, len++, SEED)); IsAlive(farmhashsa::Hash32(data, len++)); IsAlive(farmhashsa::Hash32(data, len++)); len -= 3; return alive > 0; } |
7477 | Check(farmhashsa::Hash32WithSeed(data + offset, len, SEED)); |
7478 | Check(farmhashsa::Hash32(data + offset, len)); |
7479 | |
7480 | return true; |
7481 | #undef Check |
7482 | #undef IsAlive |
7483 | } |
7484 | |
7485 | int RunTest() { |
7486 | Setup(); |
7487 | int i = 0; |
7488 | cout << "Running farmhashsaTest" ; |
7489 | if (!Test(-1)) { |
7490 | cout << "... Unavailable\n" ; |
7491 | return NoteErrors(); |
7492 | } |
7493 | // Good. The function is attempting to hash, so run the full test. |
7494 | int errors_prior_to_test = errors; |
7495 | for ( ; i < kTestSize - 1; i++) { |
7496 | Test(i * i, i); |
7497 | } |
7498 | for ( ; i < kDataSize; i += i / 7) { |
7499 | Test(0, i); |
7500 | } |
7501 | Test(0, kDataSize); |
7502 | cout << (errors == errors_prior_to_test ? "... OK\n" : "... Failed\n" ); |
7503 | return NoteErrors(); |
7504 | } |
7505 | |
7506 | #else |
7507 | |
7508 | // After the following line is where the code to print hash codes will go. |
7509 | void Dump(int offset, int len) { |
7510 | cout << farmhashsa::Hash32WithSeed(data + offset, len, SEED) << "u," << endl; |
7511 | cout << farmhashsa::Hash32(data + offset, len) << "u," << endl; |
7512 | } |
7513 | |
7514 | #endif |
7515 | |
7516 | #undef SEED |
7517 | #undef SEED1 |
7518 | #undef SEED0 |
7519 | |
7520 | } // namespace farmhashsaTest |
7521 | |
7522 | #if TESTING |
7523 | |
7524 | static int farmhashsaTestResult = farmhashsaTest::RunTest(); |
7525 | |
7526 | #else |
7527 | int main(int argc, char** argv) { |
7528 | Setup(); |
7529 | cout << "uint32_t expected[] = {\n" ; |
7530 | int i = 0; |
7531 | for ( ; i < kTestSize - 1; i++) { |
7532 | farmhashsaTest::Dump(i * i, i); |
7533 | } |
7534 | for ( ; i < kDataSize; i += i / 7) { |
7535 | farmhashsaTest::Dump(0, i); |
7536 | } |
7537 | farmhashsaTest::Dump(0, kDataSize); |
7538 | cout << "};\n" ; |
7539 | } |
7540 | #endif |
7541 | #ifndef FARMHASH_SELF_TEST_GUARD |
7542 | #define FARMHASH_SELF_TEST_GUARD |
7543 | #include <cstdio> |
7544 | #include <iostream> |
7545 | #include <string.h> |
7546 | |
7547 | using std::cout; |
7548 | using std::cerr; |
7549 | using std::endl; |
7550 | using std::hex; |
7551 | |
7552 | static const uint64_t kSeed0 = 1234567; |
7553 | static const uint64_t kSeed1 = k0; |
7554 | static const int kDataSize = 1 << 20; |
7555 | static const int kTestSize = 300; |
7556 | #define kSeed128 Uint128(kSeed0, kSeed1) |
7557 | |
7558 | static char data[kDataSize]; |
7559 | |
7560 | static int completed_self_tests = 0; |
7561 | static int errors = 0; |
7562 | |
7563 | // Initialize data to pseudorandom values. |
7564 | void Setup() { |
7565 | if (completed_self_tests == 0) { |
7566 | uint64_t a = 9; |
7567 | uint64_t b = 777; |
7568 | for (int i = 0; i < kDataSize; i++) { |
7569 | a += b; |
7570 | b += a; |
7571 | a = (a ^ (a >> 41)) * k0; |
7572 | b = (b ^ (b >> 41)) * k0 + i; |
7573 | uint8_t u = b >> 37; |
7574 | memcpy(data + i, &u, 1); // uint8_t -> char |
7575 | } |
7576 | } |
7577 | } |
7578 | |
7579 | int NoteErrors() { |
7580 | #define NUM_SELF_TESTS 9 |
7581 | if (++completed_self_tests == NUM_SELF_TESTS) |
7582 | std::exit(errors > 0); |
7583 | return errors; |
7584 | } |
7585 | |
7586 | template <typename T> inline bool IsNonZero(T x) { |
7587 | return x != 0; |
7588 | } |
7589 | |
7590 | template <> inline bool IsNonZero<uint128_t>(uint128_t x) { |
7591 | return x != Uint128(0, 0); |
7592 | } |
7593 | |
7594 | #endif // FARMHASH_SELF_TEST_GUARD |
7595 | |
7596 | namespace farmhashsuTest { |
7597 | |
7598 | uint32_t CreateSeed(int offset, int salt) { |
7599 | uint32_t h = static_cast<uint32_t>(salt & 0xffffffff); |
7600 | h = h * c1; |
7601 | h ^= (h >> 17); |
7602 | h = h * c1; |
7603 | h ^= (h >> 17); |
7604 | h = h * c1; |
7605 | h ^= (h >> 17); |
7606 | h += static_cast<uint32_t>(offset & 0xffffffff); |
7607 | h = h * c1; |
7608 | h ^= (h >> 17); |
7609 | h = h * c1; |
7610 | h ^= (h >> 17); |
7611 | h = h * c1; |
7612 | h ^= (h >> 17); |
7613 | return h; |
7614 | } |
7615 | |
7616 | #undef SEED |
7617 | #undef SEED1 |
7618 | #undef SEED0 |
7619 | #define SEED CreateSeed(offset, -1) |
7620 | #define SEED0 CreateSeed(offset, 0) |
7621 | #define SEED1 CreateSeed(offset, 1) |
7622 | |
7623 | #undef TESTING |
7624 | #define TESTING 1 |
7625 | #if TESTING |
7626 | uint32_t expected[] = { |
7627 | 4223616069u, |
7628 | 3696677242u, |
7629 | 4081014168u, |
7630 | 2576519988u, |
7631 | 2212771159u, |
7632 | 1112731063u, |
7633 | 1020067935u, |
7634 | 3955445564u, |
7635 | 1451961420u, |
7636 | 653440099u, |
7637 | 31917516u, |
7638 | 2957164615u, |
7639 | 2590087362u, |
7640 | 3879448744u, |
7641 | 176305566u, |
7642 | 2447367541u, |
7643 | 1359016305u, |
7644 | 3363804638u, |
7645 | 1117290165u, |
7646 | 1062549743u, |
7647 | 2437877004u, |
7648 | 1894455839u, |
7649 | 673206794u, |
7650 | 3486923651u, |
7651 | 3269862919u, |
7652 | 2303349487u, |
7653 | 1380660650u, |
7654 | 595525107u, |
7655 | 1525325287u, |
7656 | 2025609358u, |
7657 | 176408838u, |
7658 | 1592885012u, |
7659 | 864896482u, |
7660 | 2101378090u, |
7661 | 3489229104u, |
7662 | 2118965695u, |
7663 | 581644891u, |
7664 | 2718789079u, |
7665 | 631613207u, |
7666 | 4228658372u, |
7667 | 3867875546u, |
7668 | 3531368319u, |
7669 | 3804516756u, |
7670 | 3317755099u, |
7671 | 1619744564u, |
7672 | 2884717286u, |
7673 | 1088213445u, |
7674 | 2667691076u, |
7675 | 3727873235u, |
7676 | 2330406762u, |
7677 | 858590707u, |
7678 | 457744844u, |
7679 | 4150036245u, |
7680 | 2000404290u, |
7681 | 1478882570u, |
7682 | 901678172u, |
7683 | 819171187u, |
7684 | 195942998u, |
7685 | 4254302102u, |
7686 | 3967266927u, |
7687 | 437030323u, |
7688 | 4018009204u, |
7689 | 2868246750u, |
7690 | 3540087514u, |
7691 | 3154852132u, |
7692 | 3319116625u, |
7693 | 357580983u, |
7694 | 3177665294u, |
7695 | 1108813287u, |
7696 | 1253366798u, |
7697 | 2315997713u, |
7698 | 510718750u, |
7699 | 1360882441u, |
7700 | 2770216279u, |
7701 | 3048866755u, |
7702 | 3406961221u, |
7703 | 3664371439u, |
7704 | 1151145514u, |
7705 | 1027891570u, |
7706 | 2699067992u, |
7707 | 3461888315u, |
7708 | 198061905u, |
7709 | 292769636u, |
7710 | 1106771795u, |
7711 | 4064110516u, |
7712 | 3258279756u, |
7713 | 762850927u, |
7714 | 1818699721u, |
7715 | 2803307356u, |
7716 | 3919169404u, |
7717 | 460980967u, |
7718 | 3125535078u, |
7719 | 2802568977u, |
7720 | 3582546426u, |
7721 | 2148940781u, |
7722 | 3963274378u, |
7723 | 1266953698u, |
7724 | 204185123u, |
7725 | 1100034381u, |
7726 | 3009193601u, |
7727 | 4200651967u, |
7728 | 274889605u, |
7729 | 2700589508u, |
7730 | 952511689u, |
7731 | 3765324859u, |
7732 | 3465498478u, |
7733 | 4014967037u, |
7734 | 2070988082u, |
7735 | 2972423530u, |
7736 | 3068638223u, |
7737 | 4156773651u, |
7738 | 489509804u, |
7739 | 1323863238u, |
7740 | 3731914806u, |
7741 | 2846098469u, |
7742 | 2728930632u, |
7743 | 346814072u, |
7744 | 848146907u, |
7745 | 551160669u, |
7746 | 4165126521u, |
7747 | 2039095001u, |
7748 | 4179859388u, |
7749 | 2434936359u, |
7750 | 2764414551u, |
7751 | 238491210u, |
7752 | 732483969u, |
7753 | 3366512764u, |
7754 | 478307468u, |
7755 | 4124179572u, |
7756 | 4142733597u, |
7757 | 1953448206u, |
7758 | 4199329278u, |
7759 | 865077060u, |
7760 | 2627662116u, |
7761 | 2802499360u, |
7762 | 3141206831u, |
7763 | 1959218197u, |
7764 | 911371451u, |
7765 | 125987200u, |
7766 | 2821366175u, |
7767 | 2530992747u, |
7768 | 2409206225u, |
7769 | 117991880u, |
7770 | 2133402461u, |
7771 | 895510531u, |
7772 | 428719601u, |
7773 | 3036014536u, |
7774 | 1223783733u, |
7775 | 733793540u, |
7776 | 970650405u, |
7777 | 547701766u, |
7778 | 570764615u, |
7779 | 3224485368u, |
7780 | 3192714940u, |
7781 | 319942831u, |
7782 | 3940200341u, |
7783 | 362056204u, |
7784 | 2832368105u, |
7785 | 1853281226u, |
7786 | 3296434636u, |
7787 | 3752508307u, |
7788 | 604292768u, |
7789 | 2231940616u, |
7790 | 1204094681u, |
7791 | 866194005u, |
7792 | 2405201650u, |
7793 | 2466384396u, |
7794 | 380829379u, |
7795 | 230033818u, |
7796 | 2783417588u, |
7797 | 4249886729u, |
7798 | 829569301u, |
7799 | 2988322580u, |
7800 | 2299983554u, |
7801 | 74748560u, |
7802 | 737514425u, |
7803 | 3153050211u, |
7804 | 652642663u, |
7805 | 1270205115u, |
7806 | 227197032u, |
7807 | 2773091790u, |
7808 | 325849216u, |
7809 | 49998791u, |
7810 | 4043203010u, |
7811 | 3662748068u, |
7812 | 1709364383u, |
7813 | 1179105165u, |
7814 | 1478504366u, |
7815 | 2980456610u, |
7816 | 1167476429u, |
7817 | 1590390732u, |
7818 | 1306256496u, |
7819 | 292008135u, |
7820 | 374690995u, |
7821 | 1809200819u, |
7822 | 1680595904u, |
7823 | 646040226u, |
7824 | 1742445560u, |
7825 | 2435776844u, |
7826 | 3703683804u, |
7827 | 478742495u, |
7828 | 814967947u, |
7829 | 2698190177u, |
7830 | 1003617993u, |
7831 | 1436118705u, |
7832 | 217056304u, |
7833 | 1412287094u, |
7834 | 2738417466u, |
7835 | 2933279339u, |
7836 | 3461877733u, |
7837 | 1203141205u, |
7838 | 2119492857u, |
7839 | 1134895723u, |
7840 | 1560001021u, |
7841 | 3786320122u, |
7842 | 3748116258u, |
7843 | 3486219595u, |
7844 | 702138030u, |
7845 | 1062984182u, |
7846 | 232789133u, |
7847 | 1566523968u, |
7848 | 3885443778u, |
7849 | 1820171888u, |
7850 | 3655858585u, |
7851 | 2316903005u, |
7852 | 2678779620u, |
7853 | 395625433u, |
7854 | 1609107564u, |
7855 | 3108726411u, |
7856 | 2937837224u, |
7857 | 3911907151u, |
7858 | 557272509u, |
7859 | 3893435978u, |
7860 | 1542613576u, |
7861 | 1079886893u, |
7862 | 2624566322u, |
7863 | 1413700616u, |
7864 | 2796974006u, |
7865 | 1922556114u, |
7866 | 562820464u, |
7867 | 2845409784u, |
7868 | 54180312u, |
7869 | 1898782464u, |
7870 | 3681814953u, |
7871 | 2417064617u, |
7872 | 1815464483u, |
7873 | 911626132u, |
7874 | 2964575550u, |
7875 | 1852696128u, |
7876 | 2319647785u, |
7877 | 1998904590u, |
7878 | 619992689u, |
7879 | 3073207513u, |
7880 | 1238163512u, |
7881 | 3199435982u, |
7882 | 828667254u, |
7883 | 3561155502u, |
7884 | 3943095163u, |
7885 | 1045711849u, |
7886 | 2238679131u, |
7887 | 2114975398u, |
7888 | 713808403u, |
7889 | 3871787494u, |
7890 | 2572031161u, |
7891 | 2360934075u, |
7892 | 2337781107u, |
7893 | 262596504u, |
7894 | 693836699u, |
7895 | 2129369850u, |
7896 | 3543189427u, |
7897 | 962205222u, |
7898 | 3685581020u, |
7899 | 692974477u, |
7900 | 725182211u, |
7901 | 646123906u, |
7902 | 2368836544u, |
7903 | 2505872733u, |
7904 | 1999977610u, |
7905 | 1639885802u, |
7906 | 1475058032u, |
7907 | 207023609u, |
7908 | 2773581234u, |
7909 | 3524857793u, |
7910 | 3433371102u, |
7911 | 3243027613u, |
7912 | 1787668353u, |
7913 | 985757946u, |
7914 | 3896012929u, |
7915 | 702356957u, |
7916 | 3559331129u, |
7917 | 884084870u, |
7918 | 4009998120u, |
7919 | 648888720u, |
7920 | 1403349048u, |
7921 | 1624342778u, |
7922 | 1766674171u, |
7923 | 2518582204u, |
7924 | 3251243146u, |
7925 | 792751003u, |
7926 | 1377201813u, |
7927 | 3629686054u, |
7928 | 1583734324u, |
7929 | 3647107626u, |
7930 | 4258564381u, |
7931 | 1469878609u, |
7932 | 1940598241u, |
7933 | 2755003690u, |
7934 | 1907120418u, |
7935 | 109916701u, |
7936 | 775347954u, |
7937 | 2090960874u, |
7938 | 611281803u, |
7939 | 3470490146u, |
7940 | 3301663253u, |
7941 | 1835412158u, |
7942 | 1803066146u, |
7943 | 591872433u, |
7944 | 550703713u, |
7945 | 1495089683u, |
7946 | 826492808u, |
7947 | 817200035u, |
7948 | 4177474571u, |
7949 | 688070143u, |
7950 | 971427632u, |
7951 | 1442499481u, |
7952 | 3568640348u, |
7953 | 2789993738u, |
7954 | 85808128u, |
7955 | 2058346726u, |
7956 | 394058570u, |
7957 | 3466511434u, |
7958 | 318905230u, |
7959 | 4149248030u, |
7960 | 415308316u, |
7961 | 165997598u, |
7962 | 1219639412u, |
7963 | 1648022659u, |
7964 | 2857432523u, |
7965 | 1422508004u, |
7966 | 468095522u, |
7967 | 296968649u, |
7968 | 430250611u, |
7969 | 1775562314u, |
7970 | 2976361671u, |
7971 | 1040036362u, |
7972 | 1372510167u, |
7973 | 292746272u, |
7974 | 3408238954u, |
7975 | 626061886u, |
7976 | 1317637569u, |
7977 | 1237775792u, |
7978 | 1218490455u, |
7979 | 2224234499u, |
7980 | 590942419u, |
7981 | 713995643u, |
7982 | 3541889330u, |
7983 | 4140218960u, |
7984 | 3529791107u, |
7985 | 354462673u, |
7986 | 842607274u, |
7987 | 365048533u, |
7988 | 2638303414u, |
7989 | 3560458014u, |
7990 | 31621379u, |
7991 | 4210854794u, |
7992 | 1273118792u, |
7993 | 2572743762u, |
7994 | 3513175801u, |
7995 | 402066986u, |
7996 | 602524471u, |
7997 | 565029192u, |
7998 | 180576438u, |
7999 | 1288605959u, |
8000 | 2896244423u, |
8001 | 1420543484u, |
8002 | 1329862227u, |
8003 | 1791567324u, |
8004 | 4248690247u, |
8005 | 12917038u, |
8006 | 3483481310u, |
8007 | 2082050731u, |
8008 | 1611921143u, |
8009 | 2443766548u, |
8010 | 2216338811u, |
8011 | 2528006095u, |
8012 | 2984009021u, |
8013 | 674210884u, |
8014 | 2857608106u, |
8015 | 2155534809u, |
8016 | 1023105067u, |
8017 | 2968955846u, |
8018 | 3303624302u, |
8019 | 2502112850u, |
8020 | 245749006u, |
8021 | 3175229091u, |
8022 | 3342796184u, |
8023 | 3613785362u, |
8024 | 1614168851u, |
8025 | 2582149283u, |
8026 | 895403488u, |
8027 | 416205023u, |
8028 | 3792242000u, |
8029 | 529397534u, |
8030 | 299415203u, |
8031 | 4284673348u, |
8032 | 2096851282u, |
8033 | 1864524731u, |
8034 | 2012577738u, |
8035 | 3426363316u, |
8036 | 1387308508u, |
8037 | 1143610148u, |
8038 | 2027467219u, |
8039 | 3772856163u, |
8040 | 3453862623u, |
8041 | 2661437174u, |
8042 | 2047145955u, |
8043 | 2533381447u, |
8044 | 2059534115u, |
8045 | 439426587u, |
8046 | 1537543414u, |
8047 | 2384289877u, |
8048 | 3174229055u, |
8049 | 2658017753u, |
8050 | 2293148474u, |
8051 | 2359450158u, |
8052 | 3930242475u, |
8053 | 1510302397u, |
8054 | 3354288821u, |
8055 | 920095603u, |
8056 | 2415746928u, |
8057 | 2729472638u, |
8058 | 2261143371u, |
8059 | 848667611u, |
8060 | 919157153u, |
8061 | 3322393117u, |
8062 | 4103299943u, |
8063 | 413569608u, |
8064 | 68911216u, |
8065 | 3334990170u, |
8066 | 1228068652u, |
8067 | 1570056373u, |
8068 | 1905477543u, |
8069 | 2622302276u, |
8070 | 2935063895u, |
8071 | 3224810004u, |
8072 | 4211768578u, |
8073 | 828688131u, |
8074 | 3556122839u, |
8075 | 1930935348u, |
8076 | 2605825202u, |
8077 | 1540993970u, |
8078 | 3209115883u, |
8079 | 122847500u, |
8080 | 665638794u, |
8081 | 506571051u, |
8082 | 2691795295u, |
8083 | 3996966556u, |
8084 | 714660621u, |
8085 | 3662432239u, |
8086 | 470651837u, |
8087 | 1807432621u, |
8088 | 3755290953u, |
8089 | 359878860u, |
8090 | 2793081615u, |
8091 | 4065031431u, |
8092 | 904653062u, |
8093 | 2317800777u, |
8094 | 568501094u, |
8095 | 3492871707u, |
8096 | 2738806116u, |
8097 | 2883859610u, |
8098 | 3242080257u, |
8099 | 364246691u, |
8100 | 3601786516u, |
8101 | 3159362524u, |
8102 | 1578272201u, |
8103 | 1283574375u, |
8104 | 2912186103u, |
8105 | 2256279032u, |
8106 | 1540671086u, |
8107 | 2356088973u, |
8108 | 2892277779u, |
8109 | 3441449267u, |
8110 | 2225005503u, |
8111 | 3846428419u, |
8112 | 2014549218u, |
8113 | 2290734767u, |
8114 | 2126684614u, |
8115 | 4235463487u, |
8116 | 3811556204u, |
8117 | 174739661u, |
8118 | 767525888u, |
8119 | 47684458u, |
8120 | 4211168099u, |
8121 | 889063422u, |
8122 | 469864411u, |
8123 | 767407110u, |
8124 | 413337343u, |
8125 | 1618456644u, |
8126 | 2814499820u, |
8127 | 2401124192u, |
8128 | 632089437u, |
8129 | 1234980238u, |
8130 | 1288585402u, |
8131 | 3153169944u, |
8132 | 2917822069u, |
8133 | 1843320264u, |
8134 | 3794359132u, |
8135 | 3074573530u, |
8136 | 258629454u, |
8137 | 3813357060u, |
8138 | 3806887248u, |
8139 | 1665524736u, |
8140 | 3324533324u, |
8141 | 3005091922u, |
8142 | 793108368u, |
8143 | 1529669805u, |
8144 | 2332660395u, |
8145 | 2217730223u, |
8146 | 2634687611u, |
8147 | 442806463u, |
8148 | 1968135266u, |
8149 | 454523002u, |
8150 | 3177866230u, |
8151 | 2808960136u, |
8152 | 4259114138u, |
8153 | 4103264843u, |
8154 | 3103714075u, |
8155 | 2462967542u, |
8156 | 1466891491u, |
8157 | 477973764u, |
8158 | 834565647u, |
8159 | 741089037u, |
8160 | 218837573u, |
8161 | 1710536528u, |
8162 | 2469088212u, |
8163 | 1229072375u, |
8164 | 2828341u, |
8165 | 176923431u, |
8166 | 985763350u, |
8167 | 4095477420u, |
8168 | 1984145538u, |
8169 | 1870791084u, |
8170 | 674956677u, |
8171 | 1978138947u, |
8172 | 1296493993u, |
8173 | 1818183554u, |
8174 | 3443333721u, |
8175 | 2124949983u, |
8176 | 2549590262u, |
8177 | 2700850794u, |
8178 | 2662736367u, |
8179 | 739638109u, |
8180 | 4061447096u, |
8181 | 2960078422u, |
8182 | 2453781158u, |
8183 | 929570940u, |
8184 | 3200328383u, |
8185 | 2406328791u, |
8186 | 1419180666u, |
8187 | 2152455739u, |
8188 | 2805741044u, |
8189 | 3305999074u, |
8190 | 3183816361u, |
8191 | 2303165050u, |
8192 | 4922104u, |
8193 | 63096005u, |
8194 | 936656347u, |
8195 | 3104453886u, |
8196 | 1088673880u, |
8197 | 1113407526u, |
8198 | 1457890086u, |
8199 | 453478383u, |
8200 | 1107686695u, |
8201 | 3626027824u, |
8202 | 1159687359u, |
8203 | 2248467888u, |
8204 | 2004578380u, |
8205 | 3274954621u, |
8206 | 1787958646u, |
8207 | 2628726704u, |
8208 | 1138419798u, |
8209 | 3735442315u, |
8210 | 692385301u, |
8211 | 313807213u, |
8212 | 2329068673u, |
8213 | 59375364u, |
8214 | 3261084359u, |
8215 | 2088644507u, |
8216 | 2471153194u, |
8217 | 788336435u, |
8218 | 4024527246u, |
8219 | 141504460u, |
8220 | 2307553888u, |
8221 | 1930559950u, |
8222 | 48975711u, |
8223 | 2745693338u, |
8224 | 230161982u, |
8225 | 3429230862u, |
8226 | 1335968626u, |
8227 | 609591304u, |
8228 | 57435073u, |
8229 | 4279281136u, |
8230 | 3152151665u, |
8231 | 3984484924u, |
8232 | 3459883943u, |
8233 | 397478330u, |
8234 | 1738762229u, |
8235 | 3033590066u, |
8236 | 3611539498u, |
8237 | 1363463523u, |
8238 | 3319364965u, |
8239 | 2671169141u, |
8240 | 3819548561u, |
8241 | 1691193757u, |
8242 | 2423834608u, |
8243 | 2820147055u, |
8244 | 1378120632u, |
8245 | 1240565187u, |
8246 | 3180720050u, |
8247 | 680831086u, |
8248 | 3309658414u, |
8249 | 1986166490u, |
8250 | 762099827u, |
8251 | 510883662u, |
8252 | 2047373648u, |
8253 | 3606742294u, |
8254 | 3894965352u, |
8255 | 2342078853u, |
8256 | 1091255717u, |
8257 | 776594727u, |
8258 | 3217317445u, |
8259 | 1574468485u, |
8260 | 3844504016u, |
8261 | 2819598918u, |
8262 | 1037401010u, |
8263 | 2550943503u, |
8264 | 3867184001u, |
8265 | 1687911772u, |
8266 | 165313836u, |
8267 | 1679575281u, |
8268 | 2418947263u, |
8269 | 2038774952u, |
8270 | 3913543652u, |
8271 | 3209155736u, |
8272 | 149905221u, |
8273 | 3859604717u, |
8274 | 713919631u, |
8275 | 4069810796u, |
8276 | 1882959164u, |
8277 | 1019939034u, |
8278 | 2379867302u, |
8279 | 3666323035u, |
8280 | 1157389013u, |
8281 | 2422300650u, |
8282 | 3366777340u, |
8283 | 2526452062u, |
8284 | 1313747885u, |
8285 | 1039617868u, |
8286 | 1620553692u, |
8287 | 2032976978u, |
8288 | 578789528u, |
8289 | 1592846839u, |
8290 | 2270630604u, |
8291 | 897850577u, |
8292 | 1603294178u, |
8293 | 3105664807u, |
8294 | 1442670138u, |
8295 | 1728019360u, |
8296 | 79313861u, |
8297 | 1683031101u, |
8298 | 1913067024u, |
8299 | 4070719870u, |
8300 | 708986470u, |
8301 | 2586453359u, |
8302 | 3993348863u, |
8303 | 3358251279u, |
8304 | 3003552537u, |
8305 | 750174793u, |
8306 | 836888956u, |
8307 | 4190747426u, |
8308 | 4251291318u, |
8309 | 4145164938u, |
8310 | 1366883260u, |
8311 | 1912910955u, |
8312 | 510192669u, |
8313 | 1851315039u, |
8314 | 3574241274u, |
8315 | 3220062924u, |
8316 | 2821142039u, |
8317 | 1317082195u, |
8318 | 2274293302u, |
8319 | 1839219569u, |
8320 | 126586168u, |
8321 | 3989293643u, |
8322 | 2680178207u, |
8323 | 347056948u, |
8324 | 799681430u, |
8325 | 2864517481u, |
8326 | 3180404853u, |
8327 | 213140045u, |
8328 | 1956305184u, |
8329 | 1474675286u, |
8330 | 3085723423u, |
8331 | 2841859626u, |
8332 | 308421914u, |
8333 | 3670309263u, |
8334 | 1765052231u, |
8335 | 245459238u, |
8336 | 113434331u, |
8337 | 4079521092u, |
8338 | 2115235526u, |
8339 | 2943408816u, |
8340 | 1055476938u, |
8341 | 1506442339u, |
8342 | 2291296392u, |
8343 | 3267864332u, |
8344 | 1282145528u, |
8345 | 3700108015u, |
8346 | 1932843667u, |
8347 | 2677701670u, |
8348 | 6041177u, |
8349 | 3889648557u, |
8350 | 1461025478u, |
8351 | }; |
8352 | |
8353 | // Return false only if offset is -1 and a spot check of 3 hashes all yield 0. |
8354 | bool Test(int offset, int len = 0) { |
8355 | #undef Check |
8356 | #undef IsAlive |
8357 | |
8358 | #define Check(x) do { \ |
8359 | const uint32_t actual = (x), e = expected[index++]; \ |
8360 | bool ok = actual == e; \ |
8361 | if (!ok) { \ |
8362 | cerr << "expected " << hex << e << " but got " << actual << endl; \ |
8363 | ++errors; \ |
8364 | } \ |
8365 | assert(ok); \ |
8366 | } while (0) |
8367 | |
8368 | #define IsAlive(x) do { alive += IsNonZero(x); } while (0) |
8369 | |
8370 | // After the following line is where the uses of "Check" and such will go. |
8371 | static int index = 0; |
8372 | if (offset == -1) { int alive = 0; IsAlive(farmhashsu::Hash32WithSeed(data, len++, SEED)); IsAlive(farmhashsu::Hash32(data, len++)); IsAlive(farmhashsu::Hash32(data, len++)); len -= 3; return alive > 0; } |
8373 | Check(farmhashsu::Hash32WithSeed(data + offset, len, SEED)); |
8374 | Check(farmhashsu::Hash32(data + offset, len)); |
8375 | |
8376 | return true; |
8377 | #undef Check |
8378 | #undef IsAlive |
8379 | } |
8380 | |
8381 | int RunTest() { |
8382 | Setup(); |
8383 | int i = 0; |
8384 | cout << "Running farmhashsuTest" ; |
8385 | if (!Test(-1)) { |
8386 | cout << "... Unavailable\n" ; |
8387 | return NoteErrors(); |
8388 | } |
8389 | // Good. The function is attempting to hash, so run the full test. |
8390 | int errors_prior_to_test = errors; |
8391 | for ( ; i < kTestSize - 1; i++) { |
8392 | Test(i * i, i); |
8393 | } |
8394 | for ( ; i < kDataSize; i += i / 7) { |
8395 | Test(0, i); |
8396 | } |
8397 | Test(0, kDataSize); |
8398 | cout << (errors == errors_prior_to_test ? "... OK\n" : "... Failed\n" ); |
8399 | return NoteErrors(); |
8400 | } |
8401 | |
8402 | #else |
8403 | |
8404 | // After the following line is where the code to print hash codes will go. |
8405 | void Dump(int offset, int len) { |
8406 | cout << farmhashsu::Hash32WithSeed(data + offset, len, SEED) << "u," << endl; |
8407 | cout << farmhashsu::Hash32(data + offset, len) << "u," << endl; |
8408 | } |
8409 | |
8410 | #endif |
8411 | |
8412 | #undef SEED |
8413 | #undef SEED1 |
8414 | #undef SEED0 |
8415 | |
8416 | } // namespace farmhashsuTest |
8417 | |
8418 | #if TESTING |
8419 | |
8420 | static int farmhashsuTestResult = farmhashsuTest::RunTest(); |
8421 | |
8422 | #else |
8423 | int main(int argc, char** argv) { |
8424 | Setup(); |
8425 | cout << "uint32_t expected[] = {\n" ; |
8426 | int i = 0; |
8427 | for ( ; i < kTestSize - 1; i++) { |
8428 | farmhashsuTest::Dump(i * i, i); |
8429 | } |
8430 | for ( ; i < kDataSize; i += i / 7) { |
8431 | farmhashsuTest::Dump(0, i); |
8432 | } |
8433 | farmhashsuTest::Dump(0, kDataSize); |
8434 | cout << "};\n" ; |
8435 | } |
8436 | #endif |
8437 | #ifndef FARMHASH_SELF_TEST_GUARD |
8438 | #define FARMHASH_SELF_TEST_GUARD |
8439 | #include <cstdio> |
8440 | #include <iostream> |
8441 | #include <string.h> |
8442 | |
8443 | using std::cout; |
8444 | using std::cerr; |
8445 | using std::endl; |
8446 | using std::hex; |
8447 | |
8448 | static const uint64_t kSeed0 = 1234567; |
8449 | static const uint64_t kSeed1 = k0; |
8450 | static const int kDataSize = 1 << 20; |
8451 | static const int kTestSize = 300; |
8452 | #define kSeed128 Uint128(kSeed0, kSeed1) |
8453 | |
8454 | static char data[kDataSize]; |
8455 | |
8456 | static int completed_self_tests = 0; |
8457 | static int errors = 0; |
8458 | |
8459 | // Initialize data to pseudorandom values. |
8460 | void Setup() { |
8461 | if (completed_self_tests == 0) { |
8462 | uint64_t a = 9; |
8463 | uint64_t b = 777; |
8464 | for (int i = 0; i < kDataSize; i++) { |
8465 | a += b; |
8466 | b += a; |
8467 | a = (a ^ (a >> 41)) * k0; |
8468 | b = (b ^ (b >> 41)) * k0 + i; |
8469 | uint8_t u = b >> 37; |
8470 | memcpy(data + i, &u, 1); // uint8_t -> char |
8471 | } |
8472 | } |
8473 | } |
8474 | |
8475 | int NoteErrors() { |
8476 | #define NUM_SELF_TESTS 9 |
8477 | if (++completed_self_tests == NUM_SELF_TESTS) |
8478 | std::exit(errors > 0); |
8479 | return errors; |
8480 | } |
8481 | |
8482 | template <typename T> inline bool IsNonZero(T x) { |
8483 | return x != 0; |
8484 | } |
8485 | |
8486 | template <> inline bool IsNonZero<uint128_t>(uint128_t x) { |
8487 | return x != Uint128(0, 0); |
8488 | } |
8489 | |
8490 | #endif // FARMHASH_SELF_TEST_GUARD |
8491 | |
8492 | namespace farmhashteTest { |
8493 | |
8494 | uint32_t CreateSeed(int offset, int salt) { |
8495 | uint32_t h = static_cast<uint32_t>(salt & 0xffffffff); |
8496 | h = h * c1; |
8497 | h ^= (h >> 17); |
8498 | h = h * c1; |
8499 | h ^= (h >> 17); |
8500 | h = h * c1; |
8501 | h ^= (h >> 17); |
8502 | h += static_cast<uint32_t>(offset & 0xffffffff); |
8503 | h = h * c1; |
8504 | h ^= (h >> 17); |
8505 | h = h * c1; |
8506 | h ^= (h >> 17); |
8507 | h = h * c1; |
8508 | h ^= (h >> 17); |
8509 | return h; |
8510 | } |
8511 | |
8512 | #undef SEED |
8513 | #undef SEED1 |
8514 | #undef SEED0 |
8515 | #define SEED CreateSeed(offset, -1) |
8516 | #define SEED0 CreateSeed(offset, 0) |
8517 | #define SEED1 CreateSeed(offset, 1) |
8518 | |
8519 | #undef TESTING |
8520 | #define TESTING 1 |
8521 | #if TESTING |
8522 | uint32_t expected[] = { |
8523 | 1140953930u, 861465670u, |
8524 | 3277735313u, 2681724312u, |
8525 | 2598464059u, 797982799u, |
8526 | 890626835u, 800175912u, |
8527 | 2603993599u, 921001710u, |
8528 | 1410420968u, 2134990486u, |
8529 | 3283896453u, 1867689945u, |
8530 | 2914424215u, 2244477846u, |
8531 | 255297188u, 2992121793u, |
8532 | 1110588164u, 4186314283u, |
8533 | 161451183u, 3943596029u, |
8534 | 4019337850u, 452431531u, |
8535 | 283198166u, 2741341286u, |
8536 | 3379021470u, 2557197665u, |
8537 | 299850021u, 2532580744u, |
8538 | 452473466u, 1706958772u, |
8539 | 1298374911u, 3099673830u, |
8540 | 2199864459u, 3696623795u, |
8541 | 236935126u, 2976578695u, |
8542 | 4055299123u, 3281581178u, |
8543 | 1053458494u, 1882212500u, |
8544 | 2305012065u, 2169731866u, |
8545 | 3456121707u, 275903667u, |
8546 | 458884671u, 3033004529u, |
8547 | 3058973506u, 2379411653u, |
8548 | 1898235244u, 1402319660u, |
8549 | 2700149065u, 2699376854u, |
8550 | 147814787u, 720739346u, |
8551 | 2433714046u, 4222949502u, |
8552 | 4220361840u, 1712034059u, |
8553 | 3425469811u, 3690733394u, |
8554 | 4148372108u, 1330324210u, |
8555 | 594028478u, 2921867846u, |
8556 | 1635026870u, 192883107u, |
8557 | 780716741u, 1728752234u, |
8558 | 3280331829u, 326029180u, |
8559 | 3969463346u, 1436364519u, |
8560 | 393215742u, 3349570000u, |
8561 | 3824583307u, 1612122221u, |
8562 | 2859809759u, 3808705738u, |
8563 | 1379537552u, 1646032583u, |
8564 | 2233466664u, 1432476832u, |
8565 | 4023053163u, 2650381482u, |
8566 | 2052294713u, 3552092450u, |
8567 | 1628777059u, 1499109081u, |
8568 | 3476440786u, 3829307897u, |
8569 | 2960536756u, 1554038301u, |
8570 | 1145519619u, 3190844552u, |
8571 | 2902102606u, 3600725550u, |
8572 | 237495366u, 540224401u, |
8573 | 65721842u, 489963606u, |
8574 | 1448662590u, 397635823u, |
8575 | 1596489240u, 1562872448u, |
8576 | 1790705123u, 2128624475u, |
8577 | 180854224u, 2604346966u, |
8578 | 1435705557u, 1262831810u, |
8579 | 155445229u, 1672724608u, |
8580 | 1669465176u, 1341975128u, |
8581 | 663607706u, 2077310004u, |
8582 | 3610042449u, 1911523866u, |
8583 | 1043692997u, 1454396064u, |
8584 | 2563776023u, 294527927u, |
8585 | 1099072299u, 1389770549u, |
8586 | 703505868u, 678706990u, |
8587 | 2952353448u, 2026137563u, |
8588 | 3603803785u, 629449419u, |
8589 | 1933894405u, 3043213226u, |
8590 | 226132789u, 2489287368u, |
8591 | 1552847036u, 645684964u, |
8592 | 3828089804u, 3632594520u, |
8593 | 187883449u, 230403464u, |
8594 | 3151491850u, 3272648435u, |
8595 | 3729087873u, 1303930448u, |
8596 | 2002861219u, 165370827u, |
8597 | 916494250u, 1230085527u, |
8598 | 3103338579u, 3064290191u, |
8599 | 3807265751u, 3628174014u, |
8600 | 231181488u, 851743255u, |
8601 | 2295806711u, 1781190011u, |
8602 | 2988893883u, 1554380634u, |
8603 | 1142264800u, 3667013118u, |
8604 | 1968445277u, 315203929u, |
8605 | 2638023604u, 2290487377u, |
8606 | 732137533u, 1909203251u, |
8607 | 440398219u, 1891630171u, |
8608 | 1380301172u, 1498556724u, |
8609 | 4072067757u, 4165088768u, |
8610 | 4204318635u, 441430649u, |
8611 | 3931792696u, 197618179u, |
8612 | 956300927u, 914413116u, |
8613 | 3010839769u, 2837339569u, |
8614 | 2148126371u, 1913303225u, |
8615 | 3074915312u, 3117299654u, |
8616 | 4139181436u, 2993479124u, |
8617 | 3178848746u, 1357272220u, |
8618 | 1438494951u, 507436733u, |
8619 | 667183474u, 2084369203u, |
8620 | 3854939912u, 1413396341u, |
8621 | 126024219u, 146044391u, |
8622 | 1016656857u, 3022024459u, |
8623 | 3254014218u, 429095991u, |
8624 | 990500595u, 3056862311u, |
8625 | 985653208u, 1718653828u, |
8626 | 623071693u, 366414107u, |
8627 | 1771289760u, 2293458109u, |
8628 | 3047342438u, 2991127487u, |
8629 | 3120876698u, 1684583131u, |
8630 | 3638043310u, 1170404994u, |
8631 | 863214540u, 1087193030u, |
8632 | 199124911u, 520792961u, |
8633 | 3169775996u, 1577421232u, |
8634 | 3331828431u, 1013201099u, |
8635 | 1716848157u, 4033596884u, |
8636 | 1770708857u, 4229339322u, |
8637 | 1146169032u, 1434258493u, |
8638 | 3824360466u, 3242407770u, |
8639 | 1926419493u, 2649785113u, |
8640 | 872586426u, 762243036u, |
8641 | 2736953692u, 816692935u, |
8642 | 1571283333u, 3555213933u, |
8643 | 2266795890u, 3781899767u, |
8644 | 4290630595u, 517646945u, |
8645 | 3006163611u, 2180594090u, |
8646 | 959214578u, 558910384u, |
8647 | 1283799121u, 3047062993u, |
8648 | 3830962609u, 2391606125u, |
8649 | 3544509313u, 622325861u, |
8650 | 834785312u, 382936554u, |
8651 | 1421463872u, 788479970u, |
8652 | 1825135056u, 2725923798u, |
8653 | 580988377u, 2826990641u, |
8654 | 247825043u, 3167748333u, |
8655 | 812546227u, 2506885666u, |
8656 | 2584372201u, 1758123094u, |
8657 | 1891789696u, 389974094u, |
8658 | 345313518u, 2022370576u, |
8659 | 3886113119u, 3338548567u, |
8660 | 1083486947u, 2583576230u, |
8661 | 1776047957u, 1771384107u, |
8662 | 3604937815u, 3198590202u, |
8663 | 3027522813u, 4155628142u, |
8664 | 4232136669u, 427759438u, |
8665 | 4244322689u, 542201663u, |
8666 | 1549591985u, 2856634168u, |
8667 | 556609672u, 45845311u, |
8668 | 1175961330u, 3948351189u, |
8669 | 4165739882u, 4194218315u, |
8670 | 1634635545u, 4151937410u, |
8671 | 713127376u, 1467786451u, |
8672 | 1327394015u, 2743592929u, |
8673 | 2638154051u, 810082938u, |
8674 | 3077742128u, 1062268187u, |
8675 | 4084325664u, 3810665822u, |
8676 | 3735739145u, 2794294783u, |
8677 | 2335576331u, 2560479831u, |
8678 | 690240711u, 997658837u, |
8679 | 2442302747u, 3948961926u, |
8680 | 3958366652u, 3067277639u, |
8681 | 2059157774u, 1211737169u, |
8682 | 1516711748u, 2339636583u, |
8683 | 4188504038u, 59581167u, |
8684 | 2767897792u, 1389679610u, |
8685 | 2658147000u, 2643979752u, |
8686 | 3758739543u, 4189944477u, |
8687 | 1454470782u, 100876854u, |
8688 | 2995362413u, 118817200u, |
8689 | 3252925478u, 2062343506u, |
8690 | 2804483644u, 3088828656u, |
8691 | 1231633714u, 4168280671u, |
8692 | 2931588131u, 3284356565u, |
8693 | 1255909792u, 3130054947u, |
8694 | 4173605289u, 1407328702u, |
8695 | 1677744031u, 3532596884u, |
8696 | 3162657845u, 3887208531u, |
8697 | 2256541290u, 3459463480u, |
8698 | 3740979556u, 259034107u, |
8699 | 392987633u, 3233195759u, |
8700 | 3606709555u, 3424793077u, |
8701 | 315836068u, 3200749877u, |
8702 | 4065431359u, 760633989u, |
8703 | 2982018998u, 1811050648u, |
8704 | 234531934u, 1115203611u, |
8705 | 3897494162u, 1516407838u, |
8706 | 1603559457u, 323296368u, |
8707 | 2632963283u, 1778459926u, |
8708 | 2879836826u, 2146672889u, |
8709 | 3486330348u, 492621815u, |
8710 | 1231665285u, 2457048126u, |
8711 | 3438440082u, 2217471853u, |
8712 | 3355404249u, 3275550588u, |
8713 | 1052645068u, 862072556u, |
8714 | 4110617119u, 3745267835u, |
8715 | 2657392572u, 4279236653u, |
8716 | 1688445808u, 701920051u, |
8717 | 956734128u, 581695350u, |
8718 | 3157862788u, 2585726058u, |
8719 | 1192588249u, 1410111809u, |
8720 | 1651193125u, 3326135446u, |
8721 | 1073280453u, 97376972u, |
8722 | 2513844237u, 2187968410u, |
8723 | 3976859649u, 4267859263u, |
8724 | 3429034542u, 564493077u, |
8725 | 3000537321u, 479241367u, |
8726 | 3845637831u, 2868987960u, |
8727 | 51544337u, 1029173765u, |
8728 | 393624922u, 704325635u, |
8729 | 2357610553u, 1418509533u, |
8730 | 2007814586u, 3866658271u, |
8731 | 3082385053u, 735688735u, |
8732 | 916110004u, 3283299459u, |
8733 | 1051684175u, 1083796807u, |
8734 | 4074716319u, 813690332u, |
8735 | 144264390u, 1439630796u, |
8736 | 1508556987u, 675582689u, |
8737 | 3748881891u, 3195309868u, |
8738 | 362884708u, 1616408198u, |
8739 | 43233176u, 837301135u, |
8740 | 881504822u, 3254795114u, |
8741 | 1385506591u, 2799925823u, |
8742 | 1469874582u, 3464841997u, |
8743 | 497175391u, 3929484338u, |
8744 | 3975771289u, 1798536177u, |
8745 | 2926265846u, 1374242438u, |
8746 | 3675707838u, 4205965408u, |
8747 | 3153165629u, 1499475160u, |
8748 | 187287713u, 548490821u, |
8749 | 3255259608u, 4247675634u, |
8750 | 1940181471u, 3779953975u, |
8751 | 687167150u, 2319566715u, |
8752 | 1742785722u, 785893184u, |
8753 | 2296977392u, 2778575413u, |
8754 | 1794720651u, 48131484u, |
8755 | 4084891412u, 1160134629u, |
8756 | 3737623280u, 823113169u, |
8757 | 3423207646u, 3803213486u, |
8758 | 710625654u, 4116162021u, |
8759 | 3693420287u, 4167766971u, |
8760 | 1666602807u, 295320990u, |
8761 | 3513255468u, 2487440590u, |
8762 | 234080704u, 4004655503u, |
8763 | 2971762528u, 1479656873u, |
8764 | 4090178629u, 4044418876u, |
8765 | 391947536u, 1462554406u, |
8766 | 3909295855u, 1239580330u, |
8767 | 1515601363u, 2011102035u, |
8768 | 1442068334u, 4265993528u, |
8769 | 1191921695u, 2291355695u, |
8770 | 4257172787u, 576405853u, |
8771 | 314332944u, 4038839101u, |
8772 | 55559918u, 2378985842u, |
8773 | 711098718u, 2425317635u, |
8774 | 1644327317u, 1401013391u, |
8775 | 4193760037u, 2958260436u, |
8776 | 3167371443u, 3062418115u, |
8777 | 3800755475u, 3167030094u, |
8778 | 3489648204u, 1405430357u, |
8779 | 526177822u, 2602636307u, |
8780 | 915406019u, 4264167741u, |
8781 | 1484090483u, 3070944737u, |
8782 | 254529415u, 4017058800u, |
8783 | 1702710265u, 1029665228u, |
8784 | 2000382906u, 3185573940u, |
8785 | 1381258384u, 4036354071u, |
8786 | 2900841028u, 2670703363u, |
8787 | 2921748807u, 2899069938u, |
8788 | 4130543625u, 688472265u, |
8789 | 4186808827u, 1054670286u, |
8790 | 1132985391u, 2840525968u, |
8791 | 4175776103u, 338058159u, |
8792 | 1735964501u, 1539305024u, |
8793 | 3497121710u, 1568260669u, |
8794 | 2227290760u, 146827036u, |
8795 | 3977176001u, 4060134777u, |
8796 | 857488494u, 250055052u, |
8797 | 4284109679u, 2502815838u, |
8798 | 2592281721u, 1603444633u, |
8799 | 1390562014u, 1556658131u, |
8800 | 616327404u, 2448966429u, |
8801 | 3051191726u, 3891353218u, |
8802 | 1213304082u, 762328245u, |
8803 | 2239052397u, 1082330589u, |
8804 | 2455957292u, 201837927u, |
8805 | 405397452u, 3079886794u, |
8806 | 2583939798u, 2848283092u, |
8807 | 3750724631u, 883849006u, |
8808 | 3204198988u, 3341327098u, |
8809 | 1855234968u, 1982110346u, |
8810 | 1485529487u, 541496720u, |
8811 | 4117290321u, 3607433551u, |
8812 | 2168864636u, 133643215u, |
8813 | 1055817409u, 3847827123u, |
8814 | 2960769387u, 4046101649u, |
8815 | 1176127003u, 4015671361u, |
8816 | 4243643405u, 2849988118u, |
8817 | 517111221u, 1796672358u, |
8818 | 2045051700u, 3452457457u, |
8819 | 2948254999u, 2102063419u, |
8820 | 1556410577u, 1536380876u, |
8821 | 3776661467u, 3281002516u, |
8822 | 1735616066u, 1539151988u, |
8823 | 1087795162u, 3332431596u, |
8824 | 685631442u, 1147951686u, |
8825 | 95237878u, 2005032160u, |
8826 | 4012206915u, 4224354805u, |
8827 | 3204999386u, 2415262714u, |
8828 | 1433635018u, 116647396u, |
8829 | 83167836u, 2881562655u, |
8830 | 2729416454u, 1029284767u, |
8831 | 881378302u, 2159170082u, |
8832 | 555057366u, 1169104445u, |
8833 | 3963877000u, 1919171906u, |
8834 | 336034862u, 2017579106u, |
8835 | 4059340529u, 3020819343u, |
8836 | 865146997u, 2473524405u, |
8837 | 944743644u, 1694443528u, |
8838 | 1804513294u, 2904752429u, |
8839 | 617975720u, 3671562289u, |
8840 | 260177668u, 505662155u, |
8841 | 1885941445u, 2504509403u, |
8842 | 2260041112u, 1019936943u, |
8843 | 3722741628u, 1511077569u, |
8844 | 3100701179u, 1379422864u, |
8845 | 1535670711u, 773792826u, |
8846 | 1103819072u, 2089123665u, |
8847 | 1157547425u, 329152940u, |
8848 | 4142587430u, 484732447u, |
8849 | 2475035432u, 1120017626u, |
8850 | 412145504u, 965125959u, |
8851 | 324924679u, 2809286837u, |
8852 | 2842141483u, 4029205195u, |
8853 | 2974306813u, 515627448u, |
8854 | 3791551981u, 1097806406u, |
8855 | 3873078673u, 136118734u, |
8856 | 1872130856u, 3632422367u, |
8857 | 3574135531u, 4017075736u, |
8858 | 1699452298u, 1403506686u, |
8859 | 344414660u, 1189129691u, |
8860 | 3487080616u, 1516736273u, |
8861 | 1805475756u, 2562064338u, |
8862 | 163335594u, 2732147834u, |
8863 | 4077452507u, 2984955003u, |
8864 | 4271866024u, 3071338162u, |
8865 | 2347111903u, 873829983u, |
8866 | 1948409509u, 1923531348u, |
8867 | 459509140u, 771592405u, |
8868 | 1750124750u, 2334938333u, |
8869 | 213811117u, 2586632018u, |
8870 | 185232757u, 4032960199u, |
8871 | 2447383637u, 284777551u, |
8872 | 1654276320u, 2687561076u, |
8873 | 3512945009u, 308584855u, |
8874 | 1861027147u, 4102279334u, |
8875 | 3203802620u, 1692079268u, |
8876 | 4250142168u, 2565680167u, |
8877 | 1507046104u, 841195925u, |
8878 | 520565830u, 3674576684u, |
8879 | 38924274u, 3770488806u, |
8880 | 2414430882u, 3978473838u, |
8881 | 3703994407u, 69201295u, |
8882 | 3099963860u, 1255084262u, |
8883 | 690971838u, 3539996781u, |
8884 | 3696902571u, 3593730713u, |
8885 | 2363435042u, 54945052u, |
8886 | 1785765213u, 184911581u, |
8887 | 1586241476u, 1939595371u, |
8888 | 2534883189u, 2432427547u, |
8889 | 2374171993u, 2039128933u, |
8890 | 2955715987u, 2295501078u, |
8891 | 2741583197u, 1280920000u, |
8892 | 686818699u, 1238742497u, |
8893 | 3843660102u, 82177963u, |
8894 | 1281043691u, 1121403845u, |
8895 | 1697846708u, 284852964u, |
8896 | 278661677u, 2889101923u, |
8897 | 2127558730u, 713121337u, |
8898 | 872502474u, 511142139u, |
8899 | 1261140657u, 1747052377u, |
8900 | 2108187161u, 927011680u, |
8901 | 955328267u, 3821994995u, |
8902 | 2707230761u, 4142246789u, |
8903 | 4134691985u, 1958963937u, |
8904 | 2498463509u, 1977988705u, |
8905 | 1419293714u, 1636932722u, |
8906 | 2567532373u, 4075249328u, |
8907 | 240575705u, 1956681213u, |
8908 | 2598802768u, 2025886508u, |
8909 | 4104757832u, 3026358429u, |
8910 | 3242615202u, 4026813725u, |
8911 | 255108733u, 1845587644u, |
8912 | 3573008472u, 3615577014u, |
8913 | 1222733548u, 1205557630u, |
8914 | 917608574u, 1363253259u, |
8915 | 1541946015u, 3087190425u, |
8916 | 1138008081u, 1444019663u, |
8917 | 109793386u, 341851980u, |
8918 | 857839960u, 2515339233u, |
8919 | 156283211u, 1906768669u, |
8920 | 3886713057u, 1276595523u, |
8921 | 2809830736u, 460237542u, |
8922 | 3420452099u, 142985419u, |
8923 | 205970448u, 4198897105u, |
8924 | 1950698961u, 2069753399u, |
8925 | 1142216925u, 1113051162u, |
8926 | 1033680610u, 4278599955u, |
8927 | 1106466069u, 356742959u, |
8928 | 531521052u, 3494863964u, |
8929 | 225629455u, 3735275001u, |
8930 | 3662626864u, 1750561299u, |
8931 | 1012864651u, 2101846429u, |
8932 | 1074553219u, 668829411u, |
8933 | 992181339u, 3384018814u, |
8934 | 3330664522u, 860966321u, |
8935 | 1885071395u, 4233785523u, |
8936 | 100741310u, 451656820u, |
8937 | 2148187612u, 1063001151u, |
8938 | 360256231u, 107312677u, |
8939 | 3650357479u, 2390172694u, |
8940 | 22452685u, 237319043u, |
8941 | 3600462351u, 1216645846u, |
8942 | 2088767754u, 164402616u, |
8943 | 2418980170u, 926137824u, |
8944 | 94638678u, 1689811113u, |
8945 | 2751052984u, 1767810825u, |
8946 | 271289013u, 3896132233u, |
8947 | 103797041u, 1397772514u, |
8948 | 3441135892u, 3323383489u, |
8949 | 2491268371u, 1662561885u, |
8950 | 1612872497u, 2986430557u, |
8951 | 2756998822u, 207428029u, |
8952 | 937973965u, 2791656726u, |
8953 | 1949717207u, 2260498180u, |
8954 | 2648427775u, 2360400900u, |
8955 | 2080496169u, 486358863u, |
8956 | 1582022990u, 1263709570u, |
8957 | 1396468647u, 1377764574u, |
8958 | 363008508u, 1293502429u, |
8959 | 224580012u, 4252610345u, |
8960 | 1435134775u, 1099809675u, |
8961 | 533671980u, 1533438766u, |
8962 | 1820532305u, 2776960536u, |
8963 | 3374512975u, 3542220540u, |
8964 | 822810075u, 3716663290u, |
8965 | 1157398049u, 3752806924u, |
8966 | 4081637863u, 337070226u, |
8967 | 3866585976u, 359270190u, |
8968 | 2110942730u, 3267551635u, |
8969 | 644850146u, 1306761320u, |
8970 | 746972907u, 934259457u, |
8971 | 2341378668u, 2220373824u, |
8972 | 1242645122u, 4109252858u, |
8973 | 1625266099u, 1173698481u, |
8974 | 383517064u, 896322512u, |
8975 | 3377483696u, 1788337208u, |
8976 | 455496839u, 3194373887u, |
8977 | 1837689083u, 1336556841u, |
8978 | 1658628529u, 2911512007u, |
8979 | 3838343487u, 2757664765u, |
8980 | 1537187340u, 3712582785u, |
8981 | 367022558u, 3071359622u, |
8982 | 3926147070u, 35432879u, |
8983 | 3093195926u, 2561488770u, |
8984 | 4273132307u, 3898950547u, |
8985 | 2838251049u, 2103926083u, |
8986 | 2549435227u, 536047554u, |
8987 | 1858986613u, 2040551642u, |
8988 | 1147412575u, 1972369852u, |
8989 | 4166184983u, 3528794619u, |
8990 | 4077477194u, 3565689036u, |
8991 | 808048238u, 3826350461u, |
8992 | 1359641525u, 1197100813u, |
8993 | 265993036u, 1864569342u, |
8994 | 725164342u, 2264788336u, |
8995 | 1831223342u, 3329594980u, |
8996 | 923017956u, 490608221u, |
8997 | 3818634478u, 258154469u, |
8998 | 1441714797u, 1174785921u, |
8999 | 3833372385u, 3287246572u, |
9000 | 1677395563u, 3569218731u, |
9001 | 868981704u, 2163330264u, |
9002 | 2649450292u, 500120236u, |
9003 | 465161780u, 746438382u, |
9004 | 1145009669u, 2520062970u, |
9005 | 2810524030u, 1561519055u, |
9006 | 1479878006u, 3864969305u, |
9007 | 2686075657u, 4042710240u, |
9008 | 3224066062u, 2774151984u, |
9009 | 2226179547u, 1643626042u, |
9010 | 2328730865u, 3160666939u, |
9011 | 2107011431u, 96459446u, |
9012 | 3920328742u, 3336407558u, |
9013 | 829404209u, 1878067032u, |
9014 | 1235983679u, 4237425634u, |
9015 | 466519055u, 3870676863u, |
9016 | 934312076u, 2952135524u, |
9017 | 276949224u, 4100839753u, |
9018 | 424001484u, 1955120893u, |
9019 | 4015478120u, 1265237690u, |
9020 | 427484362u, 4246879223u, |
9021 | 3452969617u, 1724363362u, |
9022 | 1553513184u, 834830418u, |
9023 | 1858777639u, 3476334357u, |
9024 | 4144030366u, 2450047160u, |
9025 | 2950762705u, 4277111759u, |
9026 | 358032121u, 2511026735u, |
9027 | 167923105u, 2059208280u, |
9028 | 251949572u, 3065234219u, |
9029 | 1535473864u, 556796152u, |
9030 | 1513237478u, 3150857516u, |
9031 | 1103404394u, 198182691u, |
9032 | 1476438092u, 2913077464u, |
9033 | 207119516u, 3963810232u, |
9034 | 2954651680u, 1535115487u, |
9035 | 3051522276u, 4046477658u, |
9036 | 917804636u, 864395565u, |
9037 | 632704095u, 140762681u, |
9038 | 1802040304u, 990407433u, |
9039 | 3771506212u, 4106024923u, |
9040 | 1287729497u, 2198985327u, |
9041 | 4052924496u, 2926590471u, |
9042 | 3084557148u, 1472898694u, |
9043 | 1009870118u, 559702706u, |
9044 | 4265214507u, 82077489u, |
9045 | 3067891003u, 3295678907u, |
9046 | 2402308151u, 1096697687u, |
9047 | 464407878u, 4190838199u, |
9048 | 4269578403u, 3060919438u, |
9049 | 2899950405u, 3046872820u, |
9050 | 733509243u, 1583801700u, |
9051 | 40453902u, 3879773881u, |
9052 | 1993425202u, 2185339100u, |
9053 | 1877837196u, 3912423882u, |
9054 | 3293122640u, 4104318469u, |
9055 | 1679617763u, 3703603898u, |
9056 | 8759461u, 2540185277u, |
9057 | 1152198475u, 2038345882u, |
9058 | 2503579743u, 1446869792u, |
9059 | 2019419351u, 4051584612u, |
9060 | 3178289407u, 3992503830u, |
9061 | 2879018745u, 2719373510u, |
9062 | 700836153u, 1675560450u, |
9063 | 4121245793u, 2064715719u, |
9064 | 343595772u, 1996164093u, |
9065 | 3130433948u, 405251683u, |
9066 | 2804817126u, 1607133689u, |
9067 | 463852893u, 2864244470u, |
9068 | 2224044848u, 4071581802u, |
9069 | 2537107938u, 2246347953u, |
9070 | 3207234525u, 2028708916u, |
9071 | 2272418128u, 803575837u, |
9072 | 38655481u, 2170452091u, |
9073 | 3272166407u, 557660441u, |
9074 | 4019147902u, 3841480082u, |
9075 | 298459606u, 2600943364u, |
9076 | 2440657523u, 255451671u, |
9077 | 3424361375u, 779434428u, |
9078 | 3088526123u, 490671625u, |
9079 | 1322855877u, 3452203069u, |
9080 | 3057021940u, 2285701422u, |
9081 | 2014993457u, 2390431709u, |
9082 | 2002090272u, 1568745354u, |
9083 | 1783152480u, 823305654u, |
9084 | 4053862835u, 2200236540u, |
9085 | 3009412313u, 3184047862u, |
9086 | 3032187389u, 4159715581u, |
9087 | 2966902888u, 252986948u, |
9088 | 1849329144u, 3160134214u, |
9089 | 3420960112u, 3198900547u, |
9090 | 749160960u, 379139040u, |
9091 | 1208883495u, 1566527339u, |
9092 | 3006227299u, 4194096960u, |
9093 | 556075248u, 497404038u, |
9094 | 1717327230u, 1496132623u, |
9095 | 1775955687u, 1719108984u, |
9096 | 1014328900u, 4189966956u, |
9097 | 2108574735u, 2584236470u, |
9098 | 684087286u, 531310503u, |
9099 | 4264509527u, 773405691u, |
9100 | 3088905079u, 3456882941u, |
9101 | 3105682208u, 3382290593u, |
9102 | 2289363624u, 3296306400u, |
9103 | 4168438718u, 467441309u, |
9104 | 777173623u, 3241407531u, |
9105 | 1183994815u, 1132983260u, |
9106 | 1610606159u, 2540270567u, |
9107 | 2649684057u, 1397502982u, |
9108 | 146657385u, 3318434267u, |
9109 | 2109315753u, 3348545480u, |
9110 | 3193669211u, 811750340u, |
9111 | 1073256162u, 3571673088u, |
9112 | 546596661u, 1017047954u, |
9113 | 3403136990u, 2540585554u, |
9114 | 1477047647u, 4145867423u, |
9115 | 2826408201u, 3531646869u, |
9116 | 784952939u, 943914610u, |
9117 | 2717443875u, 3657384638u, |
9118 | 1806867885u, 1903578924u, |
9119 | 3985088434u, 1911188923u, |
9120 | 1764002686u, 3672748083u, |
9121 | 1832925325u, 241574049u, |
9122 | 519948041u, 3181425568u, |
9123 | 2939747257u, 1634174593u, |
9124 | 3429894862u, 3529565564u, |
9125 | 1089679033u, 240953857u, |
9126 | 2025369941u, 2695166650u, |
9127 | 517086873u, 2964595704u, |
9128 | 3017658263u, 3828377737u, |
9129 | 2144895011u, 994799311u, |
9130 | 1184683823u, 4260564140u, |
9131 | 308018483u, 4262383425u, |
9132 | 1374752558u, 3431057723u, |
9133 | 1572637805u, 383233885u, |
9134 | 3188015819u, 4051263539u, |
9135 | 233319221u, 3794788167u, |
9136 | 2017406667u, 919677938u, |
9137 | 4074952232u, 1683612329u, |
9138 | 4213676186u, 327142514u, |
9139 | 3032591014u, 4204155962u, |
9140 | 206775997u, 2283918569u, |
9141 | 2395147154u, 3427505379u, |
9142 | 2211319468u, 4153726847u, |
9143 | 2217060665u, 350160869u, |
9144 | 2493667051u, 1648200185u, |
9145 | 3441709766u, 1387233546u, |
9146 | 140980u, 1891558063u, |
9147 | 760080239u, 2088061981u, |
9148 | 1580964938u, 740563169u, |
9149 | 422986366u, 330624974u, |
9150 | 4264507722u, 150928357u, |
9151 | 2738323042u, 2948665536u, |
9152 | 918718096u, 376390582u, |
9153 | 3966098971u, 717653678u, |
9154 | 3219466255u, 3799363969u, |
9155 | 3424344721u, 3187805406u, |
9156 | 375347278u, 3490350144u, |
9157 | 1992212097u, 2263421398u, |
9158 | 3855037968u, 1928519266u, |
9159 | 3866327955u, 1129127000u, |
9160 | 1782515131u, 2746577402u, |
9161 | 3059200728u, 2108753646u, |
9162 | 2738070963u, 1336849395u, |
9163 | 1705302106u, 768287270u, |
9164 | 1343511943u, 2247006571u, |
9165 | 1956142255u, 1780259453u, |
9166 | 3475618043u, 212490675u, |
9167 | 622521957u, 917121602u, |
9168 | 1852992332u, 1267987847u, |
9169 | 3170016833u, 2549835613u, |
9170 | 3299763344u, 2864033668u, |
9171 | 3378768767u, 1236609378u, |
9172 | 4169365948u, 3738062408u, |
9173 | 2661022773u, 2006922227u, |
9174 | 2760592161u, 3828932355u, |
9175 | 2636387819u, 2616619070u, |
9176 | 1237256330u, 3449066284u, |
9177 | 2871755260u, 3729280948u, |
9178 | 3862686086u, 431292293u, |
9179 | 3285899651u, 786322314u, |
9180 | 2531158535u, 724901242u, |
9181 | 2377363130u, 1415970351u, |
9182 | 1244759631u, 3263135197u, |
9183 | 965248856u, 174024139u, |
9184 | 2297418515u, 2954777083u, |
9185 | 987586766u, 3206261120u, |
9186 | 4059515114u, 3903854066u, |
9187 | 1931934525u, 2287507921u, |
9188 | 1827135136u, 1781944746u, |
9189 | 574617451u, 2299034788u, |
9190 | 2650140034u, 4081586725u, |
9191 | 2482286699u, 1109175923u, |
9192 | 458483596u, 618705848u, |
9193 | 4059852729u, 1813855658u, |
9194 | 4190721328u, 1129462471u, |
9195 | 4089998050u, 3575732749u, |
9196 | 2375584220u, 1037031473u, |
9197 | 1623777358u, 3389003793u, |
9198 | 546597541u, 352770237u, |
9199 | 1383747654u, 3122687303u, |
9200 | 1646071378u, 1164309901u, |
9201 | 290870767u, 830691298u, |
9202 | 929335420u, 3193251135u, |
9203 | 989577914u, 3626554867u, |
9204 | 591974737u, 3996958215u, |
9205 | 3163711272u, 3071568023u, |
9206 | 1516846461u, 3656006011u, |
9207 | 2698625268u, 2510865430u, |
9208 | 340274176u, 1167681812u, |
9209 | 3698796465u, 3155218919u, |
9210 | 4102288238u, 1673474350u, |
9211 | 3069708839u, 2704165015u, |
9212 | 1237411891u, 1854985978u, |
9213 | 3646837503u, 3625406022u, |
9214 | 921552000u, 1712976649u, |
9215 | 3939149151u, 878608872u, |
9216 | 3406359248u, 1068844551u, |
9217 | 1834682077u, 4155949943u, |
9218 | 2437686324u, 3163786257u, |
9219 | 2645117577u, 1988168803u, |
9220 | 747285578u, 1626463554u, |
9221 | 1235300371u, 1256485167u, |
9222 | 1914142538u, 4141546431u, |
9223 | 3838102563u, 582664250u, |
9224 | 1883344352u, 2083771672u, |
9225 | 2611657933u, 2139079047u, |
9226 | 2250573853u, 804336148u, |
9227 | 3066325351u, 2770847216u, |
9228 | 4275641370u, 1455750577u, |
9229 | 3346357270u, 1674051445u, |
9230 | 601221482u, 3992583643u, |
9231 | 1402445097u, 3622527604u, |
9232 | 2509017299u, 2966108111u, |
9233 | 2557027816u, 900741486u, |
9234 | 1790771021u, 2912643797u, |
9235 | 2631381069u, 4014551783u, |
9236 | 90375300u, 300318232u, |
9237 | 3269968032u, 2679371729u, |
9238 | 2664752123u, 3517585534u, |
9239 | 3253901179u, 542270815u, |
9240 | 1188641600u, 365479232u, |
9241 | 2210121140u, 760762191u, |
9242 | 1273768482u, 1216399252u, |
9243 | 3484324231u, 4287337666u, |
9244 | 16322182u, 643179562u, |
9245 | 325675502u, 3652676161u, |
9246 | 3120716054u, 3330259752u, |
9247 | 1011990087u, 2990167340u, |
9248 | 1097584090u, 3262252593u, |
9249 | 1829409951u, 3665087267u, |
9250 | 1214854475u, 2134299399u, |
9251 | 3704419305u, 411263051u, |
9252 | 1625446136u, 549838529u, |
9253 | 4283196353u, 1342880802u, |
9254 | 3460621305u, 1967599860u, |
9255 | 4282843369u, 1275671016u, |
9256 | 2544665755u, 853593042u, |
9257 | 901109753u, 2682611693u, |
9258 | 110631633u, 797487791u, |
9259 | 1472073141u, 850464484u, |
9260 | 797089608u, 3286110054u, |
9261 | 350397471u, 2775631060u, |
9262 | 366448238u, 3842907484u, |
9263 | 2219863904u, 3623364733u, |
9264 | 1850985302u, 4009616991u, |
9265 | 294963924u, 3693536939u, |
9266 | 3061255808u, 1615375832u, |
9267 | 1920066675u, 4113028420u, |
9268 | 4032223840u, 2318423400u, |
9269 | 2701956286u, 4145497671u, |
9270 | 3991532344u, 2536338351u, |
9271 | 1679099863u, 1728968857u, |
9272 | 449740816u, 2686506989u, |
9273 | 685242457u, 97590863u, |
9274 | 3258354115u, 1502282913u, |
9275 | 1235084019u, 2151665147u, |
9276 | 528459289u, 231097464u, |
9277 | 2477280726u, 3651607391u, |
9278 | 2091754612u, 1178454681u, |
9279 | 980597335u, 1604483865u, |
9280 | 1842333726u, 4146839064u, |
9281 | 3213794286u, 2601416506u, |
9282 | 754220096u, 3571436033u, |
9283 | 488595746u, 1448097974u, |
9284 | 4004834921u, 238887261u, |
9285 | 3320337489u, 1416989070u, |
9286 | 2928916831u, 4093725287u, |
9287 | 186020771u, 2367569534u, |
9288 | 3046087671u, 4090084518u, |
9289 | 3548184546u, 679517009u, |
9290 | 1962659444u, 3539886328u, |
9291 | 4192003933u, 1678423485u, |
9292 | 3827951761u, 3086277222u, |
9293 | 2144472852u, 1390394371u, |
9294 | 2976322029u, 1574517163u, |
9295 | 3553313841u, 119173722u, |
9296 | 1702434637u, 1766260771u, |
9297 | 3629581771u, 1407497759u, |
9298 | 895654784u, 751439914u, |
9299 | 4008409498u, 215917713u, |
9300 | 1482103833u, 695551833u, |
9301 | 1288382231u, 2656990891u, |
9302 | 2581779077u, 1570750352u, |
9303 | 3710689053u, 1741390464u, |
9304 | 2666411616u, 3533987737u, |
9305 | 4289478316u, 3576119563u, |
9306 | 4118694920u, 108199666u, |
9307 | 3869794273u, 963183826u, |
9308 | 2081410737u, 3796810515u, |
9309 | 791123882u, 2525792704u, |
9310 | 1036883117u, 136547246u, |
9311 | 875691100u, 2592925324u, |
9312 | 614302599u, 3013176417u, |
9313 | 2689342539u, 427154472u, |
9314 | 532957601u, 1228758574u, |
9315 | 1898117151u, 1181643858u, |
9316 | 1908591042u, 1464255968u, |
9317 | 446980910u, 2984611177u, |
9318 | 58509511u, 1046943619u, |
9319 | 3508927906u, 2001585786u, |
9320 | 2544767379u, 1525438381u, |
9321 | 552181222u, 1959725830u, |
9322 | 879448844u, 1348536411u, |
9323 | 4242243590u, 2861338018u, |
9324 | 1082052441u, 1034351453u, |
9325 | 601175800u, 764077711u, |
9326 | 530635011u, 3785343245u, |
9327 | 2178026726u, 117256687u, |
9328 | 2378297261u, 457568934u, |
9329 | 76438221u, 4104954272u, |
9330 | 956793873u, 3783168634u, |
9331 | 2485968477u, 2381948487u, |
9332 | 4226929450u, 3148473363u, |
9333 | 2518273601u, 3569490233u, |
9334 | 879369091u, 2180270337u, |
9335 | 3674375989u, 1387729170u, |
9336 | 977997984u, 4270646856u, |
9337 | 568650985u, 951677556u, |
9338 | 4213877384u, 2721005055u, |
9339 | 1073364549u, 2563403831u, |
9340 | 1678669911u, 66786703u, |
9341 | 2273631661u, 1149351924u, |
9342 | 3651298990u, 1581883443u, |
9343 | 246723096u, 1895026827u, |
9344 | 3810605772u, 3711056516u, |
9345 | 4058833288u, 2193790614u, |
9346 | 2080120290u, 3638638708u, |
9347 | 2915672708u, 2263003308u, |
9348 | 2361934197u, 4136767460u, |
9349 | 1976115991u, 3448840877u, |
9350 | 2019238520u, 225333538u, |
9351 | 874340815u, 2976159827u, |
9352 | 1555273378u, 3797521928u, |
9353 | 1942347150u, 3262952567u, |
9354 | 435997738u, 340403353u, |
9355 | 2817830907u, 2078619498u, |
9356 | 749534111u, 1178073973u, |
9357 | 894654712u, 3361226032u, |
9358 | 841092198u, 3288261538u, |
9359 | 1696412169u, 1496966875u, |
9360 | 697501571u, 1059158875u, |
9361 | 3739946319u, 2481012988u, |
9362 | 568983526u, 114945840u, |
9363 | 1559249010u, 2218244008u, |
9364 | 2841706923u, 1632780103u, |
9365 | 4020169654u, 2087949619u, |
9366 | 2438736103u, 24032648u, |
9367 | 833416317u, 3787017905u, |
9368 | 2373238993u, 2575395164u, |
9369 | 3434544481u, 3228481067u, |
9370 | 2542976862u, 2971726178u, |
9371 | 2880371864u, 3642087909u, |
9372 | 2407477975u, 2239080836u, |
9373 | 1043714217u, 3894199764u, |
9374 | 2235879182u, 203853421u, |
9375 | 2933669448u, 2504940536u, |
9376 | 834683330u, 425935223u, |
9377 | 3560796393u, 3565833278u, |
9378 | 1668000829u, 3683399154u, |
9379 | 3414330886u, 1748785729u, |
9380 | 1023171602u, 580966986u, |
9381 | 2531038985u, 3227325488u, |
9382 | 2657385925u, 2124704694u, |
9383 | 233442446u, 1107045577u, |
9384 | 3407293834u, 552770757u, |
9385 | 3899097693u, 1067532701u, |
9386 | 115667924u, 1406028344u, |
9387 | 1707768231u, 3724015962u, |
9388 | 2419657149u, 18613994u, |
9389 | 2532882091u, 3476683808u, |
9390 | 1560838678u, 811220224u, |
9391 | 895961699u, 3762914298u, |
9392 | 1328752423u, 1844996900u, |
9393 | 1420427894u, 1848067707u, |
9394 | 1210281744u, 904215228u, |
9395 | 4055325594u, 1118521573u, |
9396 | 2496554183u, 2579259919u, |
9397 | 3996647489u, 3657647605u, |
9398 | 325254059u, 3136157065u, |
9399 | 3951522674u, 4052925250u, |
9400 | 3341068436u, 2287683323u, |
9401 | 1313073005u, 126005630u, |
9402 | 2505120084u, 1194725057u, |
9403 | 853746559u, 3555092974u, |
9404 | 2689238752u, 49515858u, |
9405 | 1244776042u, 1069300695u, |
9406 | 61073168u, 1010661841u, |
9407 | 1269521335u, 1902040126u, |
9408 | 990632502u, 2378708922u, |
9409 | 3858321250u, 1400735275u, |
9410 | 2974699176u, 2771676666u, |
9411 | 170995186u, 2877798589u, |
9412 | 545726212u, 2225229957u, |
9413 | 1086473152u, 3454177594u, |
9414 | 3859483262u, 1499729584u, |
9415 | 2088002891u, 2883475137u, |
9416 | 3222194252u, 4144472319u, |
9417 | 2212229854u, 4146740722u, |
9418 | 567988835u, 1051332394u, |
9419 | 3932046135u, 542648229u, |
9420 | 3017852446u, 1277887997u, |
9421 | 162888005u, 1669710469u, |
9422 | 1492500905u, 553041029u, |
9423 | 1434876932u, 533989516u, |
9424 | 3817492747u, 584127807u, |
9425 | 4147115982u, 2993670925u, |
9426 | 4020312558u, 710021255u, |
9427 | 3509733475u, 3587959456u, |
9428 | 2088550465u, 1745399498u, |
9429 | 2952242967u, 1259815443u, |
9430 | 869648362u, 1404723176u, |
9431 | 3947542735u, 1334333531u, |
9432 | 3873471582u, 229399758u, |
9433 | 59634866u, 3239516985u, |
9434 | 3844250972u, 1275954779u, |
9435 | 492891666u, 1029533080u, |
9436 | 1552951157u, 367320647u, |
9437 | 699480890u, 3684418197u, |
9438 | 3707014310u, 471105777u, |
9439 | 1824587258u, 4030809053u, |
9440 | 3489914436u, 484559105u, |
9441 | 1235750398u, 1428453396u, |
9442 | 4230459084u, 4255931645u, |
9443 | 1848597055u, 4271715616u, |
9444 | 331780381u, 482425775u, |
9445 | 2435323270u, 3171911678u, |
9446 | 3507210587u, 928543347u, |
9447 | 4197807526u, 3680046204u, |
9448 | 2766042024u, 2159512867u, |
9449 | 179373257u, 313902234u, |
9450 | 4024837592u, 294795361u, |
9451 | 1622282562u, 647086234u, |
9452 | 2825039429u, 577214736u, |
9453 | 4043412446u, 2426981244u, |
9454 | 1277736097u, 1130129573u, |
9455 | 2601395338u, 995791646u, |
9456 | 36668922u, 3344746679u, |
9457 | 1521532225u, 1645086060u, |
9458 | 2622763015u, 4122335794u, |
9459 | 2936887705u, 494465807u, |
9460 | 2580840343u, 1064648931u, |
9461 | 1247887787u, 2752145076u, |
9462 | 1277612417u, 1249660507u, |
9463 | 2288678613u, 3312498873u, |
9464 | 2459273912u, 4238535494u, |
9465 | 3117488020u, 2571979978u, |
9466 | 2680188909u, 1471227427u, |
9467 | 1616494033u, 633688562u, |
9468 | 2268653416u, 3268237290u, |
9469 | 3021962815u, 1959779970u, |
9470 | 3321382074u, 766642813u, |
9471 | 204429780u, 1323319858u, |
9472 | 3676032891u, 1380896111u, |
9473 | 4030639049u, 3647601207u, |
9474 | 1830028502u, 2830263774u, |
9475 | 1375962216u, 1733961041u, |
9476 | 939765180u, 521947915u, |
9477 | 3903267364u, 497472767u, |
9478 | 1619700946u, 189164145u, |
9479 | 3115593885u, 486382294u, |
9480 | 1262445920u, 4062496162u, |
9481 | 2464795849u, 3770038872u, |
9482 | 4032121374u, 3235740744u, |
9483 | 3757765258u, 1777199847u, |
9484 | 2167243108u, 1912506671u, |
9485 | 4180515317u, 2276864677u, |
9486 | 536034089u, 2384915026u, |
9487 | 162938278u, 1588060152u, |
9488 | 4018349945u, 2504457929u, |
9489 | 841450426u, 2790120722u, |
9490 | 2719983588u, 1471020554u, |
9491 | 1390856732u, 3623212998u, |
9492 | 2506944218u, 1035080801u, |
9493 | 348812127u, 3026631806u, |
9494 | 746483541u, 2342164722u, |
9495 | 122104390u, 4074122771u, |
9496 | 3986865419u, 1674890530u, |
9497 | 3693306023u, 3011542850u, |
9498 | 1294951725u, 899303190u, |
9499 | 3577146915u, 3549160092u, |
9500 | 1241677652u, 4290680005u, |
9501 | 3193053279u, 2029187390u, |
9502 | 3298063095u, 3943068002u, |
9503 | 3946220635u, 2273781461u, |
9504 | 889053698u, 1376304022u, |
9505 | 1486839612u, 2127663659u, |
9506 | 344127443u, 1646681121u, |
9507 | 2780117810u, 2142045764u, |
9508 | 2694572773u, 447810651u, |
9509 | 2185527146u, 2366308558u, |
9510 | 290335413u, 584901173u, |
9511 | 2012370276u, 970504950u, |
9512 | 3258236042u, 2008155560u, |
9513 | 3945579565u, 614796295u, |
9514 | 24452072u, 2695940969u, |
9515 | 3983727134u, 3444688454u, |
9516 | 1327044473u, 3545633451u, |
9517 | 1875293322u, 1739318893u, |
9518 | 1707527799u, 2683090634u, |
9519 | 2848082386u, 2814622471u, |
9520 | 4111401777u, 2774816580u, |
9521 | 3849839194u, 437560100u, |
9522 | 2238350150u, 2462124836u, |
9523 | 665017710u, 512012738u, |
9524 | 2945294779u, 3305170944u, |
9525 | 819477765u, 59419271u, |
9526 | 155125658u, 665292744u, |
9527 | 444722813u, 3580039116u, |
9528 | 2355675635u, 663735032u, |
9529 | 3247800169u, 1579404983u, |
9530 | 1985115003u, 3397891494u, |
9531 | 358696453u, 1474896279u, |
9532 | 516388613u, 710590371u, |
9533 | 3490497111u, 2514565805u, |
9534 | 2386143445u, 477509654u, |
9535 | 412854590u, 3624609754u, |
9536 | 3214388668u, 3516075816u, |
9537 | 2731288520u, 1369482895u, |
9538 | 4033204378u, 1314000850u, |
9539 | 829769325u, 1935166880u, |
9540 | 1608191643u, 2607067237u, |
9541 | 423820371u, 3257747610u, |
9542 | 1355298041u, 3776931214u, |
9543 | 4105054901u, 2107080812u, |
9544 | 1911521879u, 3183054185u, |
9545 | 3910177801u, 675129307u, |
9546 | 1209358971u, 4205727791u, |
9547 | 1435726287u, 3333261712u, |
9548 | 1400982708u, 1154611403u, |
9549 | 1663501483u, 2837596667u, |
9550 | 3164734053u, 2759854023u, |
9551 | 4012043629u, 1963228038u, |
9552 | 3981675284u, 2677557877u, |
9553 | 520119591u, 505138315u, |
9554 | 897271356u, 1803966773u, |
9555 | 1016663294u, 616691903u, |
9556 | 2254742522u, 4032705384u, |
9557 | 2468470796u, 798395739u, |
9558 | 3025169002u, 3570037122u, |
9559 | 1461093710u, 3473799845u, |
9560 | 3702624858u, 476400898u, |
9561 | 1043039728u, 2304070437u, |
9562 | 181576948u, 602972493u, |
9563 | 3996616030u, 3289878097u, |
9564 | 2068516226u, 3922247304u, |
9565 | 1299968266u, 2520311409u, |
9566 | 1968824721u, 3214794876u, |
9567 | 1581813122u, 2668800905u, |
9568 | 3297613974u, 748160407u, |
9569 | 1145536484u, 1326769504u, |
9570 | 2973323521u, 3775262814u, |
9571 | 3218653169u, 902775872u, |
9572 | 3498603433u, 1372805534u, |
9573 | 704686363u, 3626542352u, |
9574 | 2271580579u, 1213925114u, |
9575 | 46329775u, 3009384989u, |
9576 | 1330254048u, 1194824134u, |
9577 | 514204310u, 3781981134u, |
9578 | 442526164u, 2835608783u, |
9579 | 3460471867u, 510634034u, |
9580 | 546406434u, 2716786748u, |
9581 | 2840500021u, 1669490957u, |
9582 | 2536189149u, 3251421224u, |
9583 | 1358736072u, 1089334066u, |
9584 | 3260749330u, 250756920u, |
9585 | 2974806681u, 1513718866u, |
9586 | 82635635u, 4041016629u, |
9587 | 3391765744u, 2495807367u, |
9588 | 3962674316u, 2822889695u, |
9589 | 753413337u, 2008251381u, |
9590 | 3123390177u, 106212622u, |
9591 | 490570565u, 1684884205u, |
9592 | 793892547u, 1927268995u, |
9593 | 2344148164u, 2251978818u, |
9594 | 437424236u, 2774023200u, |
9595 | 2674940754u, 3788056262u, |
9596 | 2597882666u, 3678660147u, |
9597 | 3797434193u, 3838215866u, |
9598 | 279687080u, 2656772270u, |
9599 | 2190204787u, 1997584981u, |
9600 | 3384401882u, 3160208845u, |
9601 | 3629379425u, 2668998785u, |
9602 | 1050036757u, 2954162084u, |
9603 | 917091826u, 1744374041u, |
9604 | 1454282570u, 845687881u, |
9605 | 2997173625u, 776018378u, |
9606 | 1137560602u, 1938378389u, |
9607 | 1748082354u, 2066910012u, |
9608 | 2677675207u, 918315064u, |
9609 | }; |
9610 | |
9611 | // Return false only if offset is -1 and a spot check of 3 hashes all yield 0. |
9612 | bool Test(int offset, int len = 0) { |
9613 | #undef Check |
9614 | #undef IsAlive |
9615 | |
9616 | #define Check(x) do { \ |
9617 | const uint32_t actual = (x), e = expected[index++]; \ |
9618 | bool ok = actual == e; \ |
9619 | if (!ok) { \ |
9620 | cerr << "expected " << hex << e << " but got " << actual << endl; \ |
9621 | ++errors; \ |
9622 | } \ |
9623 | assert(ok); \ |
9624 | } while (0) |
9625 | |
9626 | #define IsAlive(x) do { alive += IsNonZero(x); } while (0) |
9627 | |
9628 | // After the following line is where the uses of "Check" and such will go. |
9629 | static int index = 0; |
9630 | if (offset == -1) { int alive = 0; { uint64_t h = farmhashte::Hash64WithSeeds(data, len++, SEED0, SEED1); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashte::Hash64WithSeed(data, len++, SEED); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashte::Hash64(data, len++); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } len -= 3; return alive > 0; } |
9631 | { uint64_t h = farmhashte::Hash64WithSeeds(data + offset, len, SEED0, SEED1); Check(h >> 32); Check((h << 32) >> 32); } |
9632 | { uint64_t h = farmhashte::Hash64WithSeed(data + offset, len, SEED); Check(h >> 32); Check((h << 32) >> 32); } |
9633 | { uint64_t h = farmhashte::Hash64(data + offset, len); Check(h >> 32); Check((h << 32) >> 32); } |
9634 | |
9635 | return true; |
9636 | #undef Check |
9637 | #undef IsAlive |
9638 | } |
9639 | |
9640 | int RunTest() { |
9641 | Setup(); |
9642 | int i = 0; |
9643 | cout << "Running farmhashteTest" ; |
9644 | if (!Test(-1)) { |
9645 | cout << "... Unavailable\n" ; |
9646 | return NoteErrors(); |
9647 | } |
9648 | // Good. The function is attempting to hash, so run the full test. |
9649 | int errors_prior_to_test = errors; |
9650 | for ( ; i < kTestSize - 1; i++) { |
9651 | Test(i * i, i); |
9652 | } |
9653 | for ( ; i < kDataSize; i += i / 7) { |
9654 | Test(0, i); |
9655 | } |
9656 | Test(0, kDataSize); |
9657 | cout << (errors == errors_prior_to_test ? "... OK\n" : "... Failed\n" ); |
9658 | return NoteErrors(); |
9659 | } |
9660 | |
9661 | #else |
9662 | |
9663 | // After the following line is where the code to print hash codes will go. |
9664 | void Dump(int offset, int len) { |
9665 | { uint64_t h = farmhashte::Hash64WithSeeds(data + offset, len, SEED0, SEED1); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
9666 | { uint64_t h = farmhashte::Hash64WithSeed(data + offset, len, SEED); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
9667 | { uint64_t h = farmhashte::Hash64(data + offset, len); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
9668 | } |
9669 | |
9670 | #endif |
9671 | |
9672 | #undef SEED |
9673 | #undef SEED1 |
9674 | #undef SEED0 |
9675 | |
9676 | } // namespace farmhashteTest |
9677 | |
9678 | #if TESTING |
9679 | |
9680 | static int farmhashteTestResult = farmhashteTest::RunTest(); |
9681 | |
9682 | #else |
9683 | int main(int argc, char** argv) { |
9684 | Setup(); |
9685 | cout << "uint32_t expected[] = {\n" ; |
9686 | int i = 0; |
9687 | for ( ; i < kTestSize - 1; i++) { |
9688 | farmhashteTest::Dump(i * i, i); |
9689 | } |
9690 | for ( ; i < kDataSize; i += i / 7) { |
9691 | farmhashteTest::Dump(0, i); |
9692 | } |
9693 | farmhashteTest::Dump(0, kDataSize); |
9694 | cout << "};\n" ; |
9695 | } |
9696 | #endif |
9697 | #ifndef FARMHASH_SELF_TEST_GUARD |
9698 | #define FARMHASH_SELF_TEST_GUARD |
9699 | #include <cstdio> |
9700 | #include <iostream> |
9701 | #include <string.h> |
9702 | |
9703 | using std::cout; |
9704 | using std::cerr; |
9705 | using std::endl; |
9706 | using std::hex; |
9707 | |
9708 | static const uint64_t kSeed0 = 1234567; |
9709 | static const uint64_t kSeed1 = k0; |
9710 | static const int kDataSize = 1 << 20; |
9711 | static const int kTestSize = 300; |
9712 | #define kSeed128 Uint128(kSeed0, kSeed1) |
9713 | |
9714 | static char data[kDataSize]; |
9715 | |
9716 | static int completed_self_tests = 0; |
9717 | static int errors = 0; |
9718 | |
9719 | // Initialize data to pseudorandom values. |
9720 | void Setup() { |
9721 | if (completed_self_tests == 0) { |
9722 | uint64_t a = 9; |
9723 | uint64_t b = 777; |
9724 | for (int i = 0; i < kDataSize; i++) { |
9725 | a += b; |
9726 | b += a; |
9727 | a = (a ^ (a >> 41)) * k0; |
9728 | b = (b ^ (b >> 41)) * k0 + i; |
9729 | uint8_t u = b >> 37; |
9730 | memcpy(data + i, &u, 1); // uint8_t -> char |
9731 | } |
9732 | } |
9733 | } |
9734 | |
9735 | int NoteErrors() { |
9736 | #define NUM_SELF_TESTS 9 |
9737 | if (++completed_self_tests == NUM_SELF_TESTS) |
9738 | std::exit(errors > 0); |
9739 | return errors; |
9740 | } |
9741 | |
9742 | template <typename T> inline bool IsNonZero(T x) { |
9743 | return x != 0; |
9744 | } |
9745 | |
9746 | template <> inline bool IsNonZero<uint128_t>(uint128_t x) { |
9747 | return x != Uint128(0, 0); |
9748 | } |
9749 | |
9750 | #endif // FARMHASH_SELF_TEST_GUARD |
9751 | |
9752 | namespace farmhashuoTest { |
9753 | |
9754 | uint32_t CreateSeed(int offset, int salt) { |
9755 | uint32_t h = static_cast<uint32_t>(salt & 0xffffffff); |
9756 | h = h * c1; |
9757 | h ^= (h >> 17); |
9758 | h = h * c1; |
9759 | h ^= (h >> 17); |
9760 | h = h * c1; |
9761 | h ^= (h >> 17); |
9762 | h += static_cast<uint32_t>(offset & 0xffffffff); |
9763 | h = h * c1; |
9764 | h ^= (h >> 17); |
9765 | h = h * c1; |
9766 | h ^= (h >> 17); |
9767 | h = h * c1; |
9768 | h ^= (h >> 17); |
9769 | return h; |
9770 | } |
9771 | |
9772 | #undef SEED |
9773 | #undef SEED1 |
9774 | #undef SEED0 |
9775 | #define SEED CreateSeed(offset, -1) |
9776 | #define SEED0 CreateSeed(offset, 0) |
9777 | #define SEED1 CreateSeed(offset, 1) |
9778 | |
9779 | #undef TESTING |
9780 | #define TESTING 1 |
9781 | #if TESTING |
9782 | uint32_t expected[] = { |
9783 | 3277735313u, 2681724312u, |
9784 | 2598464059u, 797982799u, |
9785 | 2603993599u, 921001710u, |
9786 | 1410420968u, 2134990486u, |
9787 | 2914424215u, 2244477846u, |
9788 | 255297188u, 2992121793u, |
9789 | 161451183u, 3943596029u, |
9790 | 4019337850u, 452431531u, |
9791 | 3379021470u, 2557197665u, |
9792 | 299850021u, 2532580744u, |
9793 | 1298374911u, 3099673830u, |
9794 | 2199864459u, 3696623795u, |
9795 | 4055299123u, 3281581178u, |
9796 | 1053458494u, 1882212500u, |
9797 | 3456121707u, 275903667u, |
9798 | 458884671u, 3033004529u, |
9799 | 1898235244u, 1402319660u, |
9800 | 2700149065u, 2699376854u, |
9801 | 2433714046u, 4222949502u, |
9802 | 4220361840u, 1712034059u, |
9803 | 4148372108u, 1330324210u, |
9804 | 594028478u, 2921867846u, |
9805 | 780716741u, 1728752234u, |
9806 | 3280331829u, 326029180u, |
9807 | 393215742u, 3349570000u, |
9808 | 3824583307u, 1612122221u, |
9809 | 1379537552u, 1646032583u, |
9810 | 2233466664u, 1432476832u, |
9811 | 2052294713u, 3552092450u, |
9812 | 1628777059u, 1499109081u, |
9813 | 2960536756u, 1554038301u, |
9814 | 1145519619u, 3190844552u, |
9815 | 237495366u, 540224401u, |
9816 | 65721842u, 489963606u, |
9817 | 1596489240u, 1562872448u, |
9818 | 1790705123u, 2128624475u, |
9819 | 1435705557u, 1262831810u, |
9820 | 155445229u, 1672724608u, |
9821 | 663607706u, 2077310004u, |
9822 | 3610042449u, 1911523866u, |
9823 | 2563776023u, 294527927u, |
9824 | 1099072299u, 1389770549u, |
9825 | 2952353448u, 2026137563u, |
9826 | 3603803785u, 629449419u, |
9827 | 226132789u, 2489287368u, |
9828 | 1552847036u, 645684964u, |
9829 | 187883449u, 230403464u, |
9830 | 3151491850u, 3272648435u, |
9831 | 2002861219u, 165370827u, |
9832 | 916494250u, 1230085527u, |
9833 | 3807265751u, 3628174014u, |
9834 | 231181488u, 851743255u, |
9835 | 2988893883u, 1554380634u, |
9836 | 1142264800u, 3667013118u, |
9837 | 2638023604u, 2290487377u, |
9838 | 732137533u, 1909203251u, |
9839 | 1380301172u, 1498556724u, |
9840 | 4072067757u, 4165088768u, |
9841 | 3931792696u, 197618179u, |
9842 | 956300927u, 914413116u, |
9843 | 2148126371u, 1913303225u, |
9844 | 3074915312u, 3117299654u, |
9845 | 3178848746u, 1357272220u, |
9846 | 1438494951u, 507436733u, |
9847 | 3854939912u, 1413396341u, |
9848 | 126024219u, 146044391u, |
9849 | 3254014218u, 429095991u, |
9850 | 165589978u, 1578546616u, |
9851 | 623071693u, 366414107u, |
9852 | 249776086u, 1207522198u, |
9853 | 3120876698u, 1684583131u, |
9854 | 46987739u, 1157614300u, |
9855 | 199124911u, 520792961u, |
9856 | 3614377032u, 586863115u, |
9857 | 1716848157u, 4033596884u, |
9858 | 1164298657u, 4140791139u, |
9859 | 3824360466u, 3242407770u, |
9860 | 3725511003u, 232064808u, |
9861 | 2736953692u, 816692935u, |
9862 | 512845449u, 3748861010u, |
9863 | 4290630595u, 517646945u, |
9864 | 22638523u, 648000590u, |
9865 | 1283799121u, 3047062993u, |
9866 | 1024246061u, 4027776454u, |
9867 | 834785312u, 382936554u, |
9868 | 411505255u, 1973395102u, |
9869 | 580988377u, 2826990641u, |
9870 | 3474970689u, 1029055034u, |
9871 | 2584372201u, 1758123094u, |
9872 | 589567754u, 325737734u, |
9873 | 3886113119u, 3338548567u, |
9874 | 257578986u, 3698087965u, |
9875 | 3604937815u, 3198590202u, |
9876 | 2305332220u, 191910725u, |
9877 | 4244322689u, 542201663u, |
9878 | 3315355162u, 2135941665u, |
9879 | 1175961330u, 3948351189u, |
9880 | 23075771u, 3252374102u, |
9881 | 713127376u, 1467786451u, |
9882 | 663013031u, 3444053918u, |
9883 | 3077742128u, 1062268187u, |
9884 | 2115441882u, 4081398201u, |
9885 | 2335576331u, 2560479831u, |
9886 | 1379288194u, 4225182569u, |
9887 | 3958366652u, 3067277639u, |
9888 | 3667516477u, 1709989541u, |
9889 | 4188504038u, 59581167u, |
9890 | 2725013602u, 3639843023u, |
9891 | 3758739543u, 4189944477u, |
9892 | 2470483982u, 877580602u, |
9893 | 3252925478u, 2062343506u, |
9894 | 3981838403u, 3762572073u, |
9895 | 2931588131u, 3284356565u, |
9896 | 1129162571u, 732225574u, |
9897 | 1677744031u, 3532596884u, |
9898 | 3232041815u, 1652884780u, |
9899 | 3740979556u, 259034107u, |
9900 | 2227121257u, 1426140634u, |
9901 | 315836068u, 3200749877u, |
9902 | 1386256573u, 24035717u, |
9903 | 234531934u, 1115203611u, |
9904 | 1598686658u, 3146815575u, |
9905 | 2632963283u, 1778459926u, |
9906 | 739944537u, 579625482u, |
9907 | 1231665285u, 2457048126u, |
9908 | 3903349120u, 389846205u, |
9909 | 1052645068u, 862072556u, |
9910 | 2834153464u, 1481069623u, |
9911 | 1688445808u, 701920051u, |
9912 | 3740748788u, 3388062747u, |
9913 | 1192588249u, 1410111809u, |
9914 | 2633463887u, 4050419847u, |
9915 | 2513844237u, 2187968410u, |
9916 | 2951683019u, 3015806005u, |
9917 | 3000537321u, 479241367u, |
9918 | 252167538u, 1231057113u, |
9919 | 393624922u, 704325635u, |
9920 | 1467197045u, 2066433573u, |
9921 | 3082385053u, 735688735u, |
9922 | 956434529u, 4028590195u, |
9923 | 4074716319u, 813690332u, |
9924 | 2124740535u, 804073145u, |
9925 | 3748881891u, 3195309868u, |
9926 | 841856605u, 2585865274u, |
9927 | 881504822u, 3254795114u, |
9928 | 1241815736u, 970796142u, |
9929 | 497175391u, 3929484338u, |
9930 | 4264993211u, 1835322201u, |
9931 | 3675707838u, 4205965408u, |
9932 | 300298607u, 3858319990u, |
9933 | 3255259608u, 4247675634u, |
9934 | 1095823272u, 1197245408u, |
9935 | 1742785722u, 785893184u, |
9936 | 1702965674u, 850401405u, |
9937 | 4084891412u, 1160134629u, |
9938 | 2555998391u, 1972759056u, |
9939 | 710625654u, 4116162021u, |
9940 | 3352753742u, 85121177u, |
9941 | 3513255468u, 2487440590u, |
9942 | 2480032715u, 2287747045u, |
9943 | 4090178629u, 4044418876u, |
9944 | 1703944517u, 486290428u, |
9945 | 1515601363u, 2011102035u, |
9946 | 573985957u, 3536053779u, |
9947 | 4257172787u, 576405853u, |
9948 | 1523550693u, 1014952061u, |
9949 | 711098718u, 2425317635u, |
9950 | 3460807169u, 3688987163u, |
9951 | 3167371443u, 3062418115u, |
9952 | 3330028292u, 1713171303u, |
9953 | 526177822u, 2602636307u, |
9954 | 1245357025u, 3346699703u, |
9955 | 254529415u, 4017058800u, |
9956 | 1829738451u, 2164236533u, |
9957 | 1381258384u, 4036354071u, |
9958 | 1749181924u, 4118435443u, |
9959 | 4130543625u, 688472265u, |
9960 | 2731071299u, 2547657502u, |
9961 | 4175776103u, 338058159u, |
9962 | 3729582129u, 4181845558u, |
9963 | 2227290760u, 146827036u, |
9964 | 2459178427u, 1025353883u, |
9965 | 4284109679u, 2502815838u, |
9966 | 825124804u, 2533140036u, |
9967 | 616327404u, 2448966429u, |
9968 | 413992636u, 2334782461u, |
9969 | 2239052397u, 1082330589u, |
9970 | 3381164715u, 199381437u, |
9971 | 2583939798u, 2848283092u, |
9972 | 2300168091u, 2156336315u, |
9973 | 1855234968u, 1982110346u, |
9974 | 2482046810u, 3158163887u, |
9975 | 2168864636u, 133643215u, |
9976 | 3904021624u, 3646514568u, |
9977 | 1176127003u, 4015671361u, |
9978 | 100525019u, 3534706803u, |
9979 | 2045051700u, 3452457457u, |
9980 | 1492267772u, 2308393828u, |
9981 | 3776661467u, 3281002516u, |
9982 | 4246334524u, 743955039u, |
9983 | 685631442u, 1147951686u, |
9984 | 2040912376u, 2911148054u, |
9985 | 3204999386u, 2415262714u, |
9986 | 313209105u, 777065474u, |
9987 | 2729416454u, 1029284767u, |
9988 | 1632078298u, 1817552554u, |
9989 | 3963877000u, 1919171906u, |
9990 | 3843219958u, 3073580867u, |
9991 | 865146997u, 2473524405u, |
9992 | 2593817617u, 3643076308u, |
9993 | 617975720u, 3671562289u, |
9994 | 121812599u, 2902367378u, |
9995 | 2260041112u, 1019936943u, |
9996 | 320945955u, 2337845588u, |
9997 | 1535670711u, 773792826u, |
9998 | 3152195900u, 4090794518u, |
9999 | 4142587430u, 484732447u, |
10000 | 419191319u, 3377973345u, |
10001 | 324924679u, 2809286837u, |
10002 | 1562277603u, 1378362199u, |
10003 | 3791551981u, 1097806406u, |
10004 | 1386297408u, 2304900033u, |
10005 | 3574135531u, 4017075736u, |
10006 | 1161238398u, 1358056883u, |
10007 | 3487080616u, 1516736273u, |
10008 | 851615042u, 2927899494u, |
10009 | 4077452507u, 2984955003u, |
10010 | 3907754394u, 3578173844u, |
10011 | 1948409509u, 1923531348u, |
10012 | 3578472493u, 3710074193u, |
10013 | 213811117u, 2586632018u, |
10014 | 1922589216u, 274958014u, |
10015 | 1654276320u, 2687561076u, |
10016 | 2569061755u, 3122046057u, |
10017 | 3203802620u, 1692079268u, |
10018 | 477806878u, 140587742u, |
10019 | 520565830u, 3674576684u, |
10020 | 91246882u, 1010215946u, |
10021 | 3703994407u, 69201295u, |
10022 | 776213083u, 3677771507u, |
10023 | 3696902571u, 3593730713u, |
10024 | 2907901228u, 3239753796u, |
10025 | 1586241476u, 1939595371u, |
10026 | 2268396558u, 3468719670u, |
10027 | 2955715987u, 2295501078u, |
10028 | 2775848696u, 1358532390u, |
10029 | 3843660102u, 82177963u, |
10030 | 4094477877u, 191727221u, |
10031 | 278661677u, 2889101923u, |
10032 | 1352525614u, 2844977667u, |
10033 | 1261140657u, 1747052377u, |
10034 | 2334120653u, 645125282u, |
10035 | 2707230761u, 4142246789u, |
10036 | 1068639717u, 2288162940u, |
10037 | 1419293714u, 1636932722u, |
10038 | 3252686293u, 318543902u, |
10039 | 2598802768u, 2025886508u, |
10040 | 2250788464u, 2711763065u, |
10041 | 255108733u, 1845587644u, |
10042 | 3719270134u, 3940707863u, |
10043 | 917608574u, 1363253259u, |
10044 | 788659330u, 673256220u, |
10045 | 109793386u, 341851980u, |
10046 | 2698465479u, 3011229884u, |
10047 | 3886713057u, 1276595523u, |
10048 | 2439962760u, 2700515456u, |
10049 | 205970448u, 4198897105u, |
10050 | 875511891u, 371715572u, |
10051 | 1033680610u, 4278599955u, |
10052 | 3120038721u, 1256300069u, |
10053 | 225629455u, 3735275001u, |
10054 | 3961944123u, 1769389163u, |
10055 | 1074553219u, 668829411u, |
10056 | 1098679359u, 2573697509u, |
10057 | 1885071395u, 4233785523u, |
10058 | 2513878053u, 2030193788u, |
10059 | 360256231u, 107312677u, |
10060 | 310517502u, 2618936366u, |
10061 | 3600462351u, 1216645846u, |
10062 | 2970730323u, 4278812598u, |
10063 | 94638678u, 1689811113u, |
10064 | 4125738800u, 3103759730u, |
10065 | 103797041u, 1397772514u, |
10066 | 1669653333u, 572567964u, |
10067 | 1612872497u, 2986430557u, |
10068 | 214990655u, 3117607990u, |
10069 | 1949717207u, 2260498180u, |
10070 | 1493936866u, 3554860960u, |
10071 | 1582022990u, 1263709570u, |
10072 | 1244120487u, 3416600761u, |
10073 | 224580012u, 4252610345u, |
10074 | 286306391u, 814956796u, |
10075 | 1820532305u, 2776960536u, |
10076 | 3082703465u, 1659265982u, |
10077 | 1157398049u, 3752806924u, |
10078 | 3508246460u, 2902716664u, |
10079 | 2110942730u, 3267551635u, |
10080 | 902835431u, 405228165u, |
10081 | 2341378668u, 2220373824u, |
10082 | 3303626294u, 1175118221u, |
10083 | 383517064u, 896322512u, |
10084 | 1697257567u, 2202820683u, |
10085 | 1837689083u, 1336556841u, |
10086 | 914535232u, 3634083711u, |
10087 | 1537187340u, 3712582785u, |
10088 | 1088201893u, 3270984620u, |
10089 | 3093195926u, 2561488770u, |
10090 | 1962968100u, 236189500u, |
10091 | 2549435227u, 536047554u, |
10092 | 422609195u, 2958815818u, |
10093 | 4166184983u, 3528794619u, |
10094 | 1042329086u, 3914176886u, |
10095 | 1359641525u, 1197100813u, |
10096 | 1269739674u, 3301844628u, |
10097 | 1831223342u, 3329594980u, |
10098 | 2433669782u, 494908536u, |
10099 | 1441714797u, 1174785921u, |
10100 | 1933050423u, 958901065u, |
10101 | 868981704u, 2163330264u, |
10102 | 3243110680u, 1443133429u, |
10103 | 1145009669u, 2520062970u, |
10104 | 3851564853u, 2664619323u, |
10105 | 2686075657u, 4042710240u, |
10106 | 2125408249u, 4165697916u, |
10107 | 2328730865u, 3160666939u, |
10108 | 588683409u, 2126275847u, |
10109 | 829404209u, 1878067032u, |
10110 | 2567792910u, 897670516u, |
10111 | 934312076u, 2952135524u, |
10112 | 504832490u, 3312698056u, |
10113 | 4015478120u, 1265237690u, |
10114 | 3376133707u, 967674402u, |
10115 | 1553513184u, 834830418u, |
10116 | 2396504772u, 3278582098u, |
10117 | 2950762705u, 4277111759u, |
10118 | 4159211303u, 1290097509u, |
10119 | 251949572u, 3065234219u, |
10120 | 1832020534u, 312136369u, |
10121 | 1103404394u, 198182691u, |
10122 | 1369599600u, 3906710870u, |
10123 | 2954651680u, 1535115487u, |
10124 | 2389327507u, 1813520230u, |
10125 | 632704095u, 140762681u, |
10126 | 3123202913u, 3336005523u, |
10127 | 1287729497u, 2198985327u, |
10128 | 2470730783u, 3821758006u, |
10129 | 1009870118u, 559702706u, |
10130 | 4274686257u, 3187546567u, |
10131 | 2402308151u, 1096697687u, |
10132 | 678932329u, 3716363135u, |
10133 | 2899950405u, 3046872820u, |
10134 | 3754655641u, 2021741414u, |
10135 | 1993425202u, 2185339100u, |
10136 | 2838253700u, 3099212100u, |
10137 | 1679617763u, 3703603898u, |
10138 | 1135665833u, 3559875668u, |
10139 | 2503579743u, 1446869792u, |
10140 | 879818611u, 3788305533u, |
10141 | 2879018745u, 2719373510u, |
10142 | 3606051203u, 2166567748u, |
10143 | 343595772u, 1996164093u, |
10144 | 1577656121u, 475248376u, |
10145 | 463852893u, 2864244470u, |
10146 | 1332049663u, 3326459767u, |
10147 | 3207234525u, 2028708916u, |
10148 | 938916154u, 3115246264u, |
10149 | 3272166407u, 557660441u, |
10150 | 1265684026u, 245033807u, |
10151 | 2440657523u, 255451671u, |
10152 | 3811885130u, 1399880284u, |
10153 | 1322855877u, 3452203069u, |
10154 | 1324994449u, 3796404024u, |
10155 | 2002090272u, 1568745354u, |
10156 | 3700047753u, 31799506u, |
10157 | 3009412313u, 3184047862u, |
10158 | 728680761u, 3848624873u, |
10159 | 1849329144u, 3160134214u, |
10160 | 1272923193u, 1474278816u, |
10161 | 1208883495u, 1566527339u, |
10162 | 4136466541u, 630825649u, |
10163 | 1717327230u, 1496132623u, |
10164 | 2449386742u, 128106940u, |
10165 | 2108574735u, 2584236470u, |
10166 | 2872246579u, 397338552u, |
10167 | 3088905079u, 3456882941u, |
10168 | 1715915153u, 2940716269u, |
10169 | 4168438718u, 467441309u, |
10170 | 872996731u, 3206901319u, |
10171 | 1610606159u, 2540270567u, |
10172 | 1301658081u, 2379410194u, |
10173 | 2109315753u, 3348545480u, |
10174 | 2041927873u, 2644077493u, |
10175 | 546596661u, 1017047954u, |
10176 | 2596792972u, 2783958892u, |
10177 | 2826408201u, 3531646869u, |
10178 | 2219352672u, 4217451852u, |
10179 | 1806867885u, 1903578924u, |
10180 | 2076465705u, 2373061493u, |
10181 | 1832925325u, 241574049u, |
10182 | 1509517110u, 3703614272u, |
10183 | 3429894862u, 3529565564u, |
10184 | 4010000614u, 2256197939u, |
10185 | 517086873u, 2964595704u, |
10186 | 3501035294u, 4079457298u, |
10187 | 1184683823u, 4260564140u, |
10188 | 2339268412u, 3871564102u, |
10189 | 1572637805u, 383233885u, |
10190 | 3351411126u, 3419328182u, |
10191 | 2017406667u, 919677938u, |
10192 | 29804156u, 46276077u, |
10193 | 3032591014u, 4204155962u, |
10194 | 1172319502u, 969309871u, |
10195 | 2211319468u, 4153726847u, |
10196 | 3094193193u, 4240669441u, |
10197 | 3441709766u, 1387233546u, |
10198 | 4048882438u, 1217896566u, |
10199 | 1580964938u, 740563169u, |
10200 | 3691850348u, 3176426539u, |
10201 | 2738323042u, 2948665536u, |
10202 | 1474029445u, 3513354882u, |
10203 | 3219466255u, 3799363969u, |
10204 | 3961796122u, 1055550923u, |
10205 | 1992212097u, 2263421398u, |
10206 | 4289759174u, 2516844140u, |
10207 | 1782515131u, 2746577402u, |
10208 | 721928440u, 3529570984u, |
10209 | 1705302106u, 768287270u, |
10210 | 3474902815u, 4000011125u, |
10211 | 3475618043u, 212490675u, |
10212 | 549130471u, 2970128275u, |
10213 | 3170016833u, 2549835613u, |
10214 | 3691104824u, 2694324482u, |
10215 | 4169365948u, 3738062408u, |
10216 | 602930397u, 2148954730u, |
10217 | 2636387819u, 2616619070u, |
10218 | 301617872u, 374657036u, |
10219 | 3862686086u, 431292293u, |
10220 | 4225245165u, 1358580562u, |
10221 | 2377363130u, 1415970351u, |
10222 | 3885060756u, 1438379807u, |
10223 | 2297418515u, 2954777083u, |
10224 | 3970368221u, 1229801760u, |
10225 | 1931934525u, 2287507921u, |
10226 | 1713471510u, 2145608111u, |
10227 | 2650140034u, 4081586725u, |
10228 | 4196863572u, 1896558394u, |
10229 | 4059852729u, 1813855658u, |
10230 | 2618400836u, 1396056469u, |
10231 | 2375584220u, 1037031473u, |
10232 | 249284003u, 2450077637u, |
10233 | 1383747654u, 3122687303u, |
10234 | 2664431743u, 3855028730u, |
10235 | 929335420u, 3193251135u, |
10236 | 137313762u, 1850894384u, |
10237 | 3163711272u, 3071568023u, |
10238 | 418541677u, 3621223039u, |
10239 | 340274176u, 1167681812u, |
10240 | 4106647531u, 4022465625u, |
10241 | 3069708839u, 2704165015u, |
10242 | 2332023349u, 641449034u, |
10243 | 921552000u, 1712976649u, |
10244 | 1876484273u, 2343049860u, |
10245 | 1834682077u, 4155949943u, |
10246 | 2061821157u, 4240649383u, |
10247 | 747285578u, 1626463554u, |
10248 | 165503115u, 359629739u, |
10249 | 3838102563u, 582664250u, |
10250 | 3878924635u, 4117237498u, |
10251 | 2250573853u, 804336148u, |
10252 | 331393443u, 4242530387u, |
10253 | 3346357270u, 1674051445u, |
10254 | 3348019777u, 1722242971u, |
10255 | 2509017299u, 2966108111u, |
10256 | 4189102509u, 3323592310u, |
10257 | 2631381069u, 4014551783u, |
10258 | 4250787412u, 3448394212u, |
10259 | 2664752123u, 3517585534u, |
10260 | 3605365141u, 1669471183u, |
10261 | 2210121140u, 760762191u, |
10262 | 249697459u, 3416920106u, |
10263 | 16322182u, 643179562u, |
10264 | 1564226597u, 2134630675u, |
10265 | 1011990087u, 2990167340u, |
10266 | 2349550842u, 1642428946u, |
10267 | 1214854475u, 2134299399u, |
10268 | 2704221532u, 2104175211u, |
10269 | 4283196353u, 1342880802u, |
10270 | 198529755u, 2004468390u, |
10271 | 2544665755u, 853593042u, |
10272 | 2090611294u, 2970943872u, |
10273 | 1472073141u, 850464484u, |
10274 | 1407609278u, 3062461105u, |
10275 | 366448238u, 3842907484u, |
10276 | 488797416u, 1432670231u, |
10277 | 294963924u, 3693536939u, |
10278 | 3390549825u, 1583234720u, |
10279 | 4032223840u, 2318423400u, |
10280 | 2965642867u, 930822729u, |
10281 | 1679099863u, 1728968857u, |
10282 | 900822335u, 702309817u, |
10283 | 3258354115u, 1502282913u, |
10284 | 2811888503u, 3924947660u, |
10285 | 2477280726u, 3651607391u, |
10286 | 3788310204u, 1300369123u, |
10287 | 1842333726u, 4146839064u, |
10288 | 2468893861u, 4091095953u, |
10289 | 488595746u, 1448097974u, |
10290 | 1159634090u, 1738834113u, |
10291 | 2928916831u, 4093725287u, |
10292 | 530850094u, 291657799u, |
10293 | 3548184546u, 679517009u, |
10294 | 399175380u, 2658337143u, |
10295 | 3827951761u, 3086277222u, |
10296 | 2067718397u, 3632376023u, |
10297 | 3553313841u, 119173722u, |
10298 | 1702434637u, 1766260771u, |
10299 | 895654784u, 751439914u, |
10300 | 4008409498u, 215917713u, |
10301 | 1288382231u, 2656990891u, |
10302 | 2581779077u, 1570750352u, |
10303 | 2666411616u, 3533987737u, |
10304 | 4289478316u, 3576119563u, |
10305 | 3869794273u, 963183826u, |
10306 | 2081410737u, 3796810515u, |
10307 | 1036883117u, 136547246u, |
10308 | 875691100u, 2592925324u, |
10309 | 2689342539u, 427154472u, |
10310 | 532957601u, 1228758574u, |
10311 | 1908591042u, 1464255968u, |
10312 | 446980910u, 2984611177u, |
10313 | 3508927906u, 2001585786u, |
10314 | 2544767379u, 1525438381u, |
10315 | 879448844u, 1348536411u, |
10316 | 4242243590u, 2861338018u, |
10317 | 601175800u, 764077711u, |
10318 | 530635011u, 3785343245u, |
10319 | 2378297261u, 457568934u, |
10320 | 76438221u, 4104954272u, |
10321 | 2485968477u, 2381948487u, |
10322 | 4226929450u, 3148473363u, |
10323 | 879369091u, 2180270337u, |
10324 | 3674375989u, 1387729170u, |
10325 | 568650985u, 951677556u, |
10326 | 4213877384u, 2721005055u, |
10327 | 1678669911u, 66786703u, |
10328 | 2273631661u, 1149351924u, |
10329 | 246723096u, 1895026827u, |
10330 | 3810605772u, 3711056516u, |
10331 | 2080120290u, 3638638708u, |
10332 | 2915672708u, 2263003308u, |
10333 | 1976115991u, 3448840877u, |
10334 | 2019238520u, 225333538u, |
10335 | 1555273378u, 3797521928u, |
10336 | 1942347150u, 3262952567u, |
10337 | 2817830907u, 2078619498u, |
10338 | 749534111u, 1178073973u, |
10339 | 841092198u, 3288261538u, |
10340 | 1696412169u, 1496966875u, |
10341 | 3739946319u, 2481012988u, |
10342 | 568983526u, 114945840u, |
10343 | 2841706923u, 1632780103u, |
10344 | 4020169654u, 2087949619u, |
10345 | 833416317u, 3787017905u, |
10346 | 2373238993u, 2575395164u, |
10347 | 2542976862u, 2971726178u, |
10348 | 2880371864u, 3642087909u, |
10349 | 1043714217u, 3894199764u, |
10350 | 2235879182u, 203853421u, |
10351 | 834683330u, 425935223u, |
10352 | 3560796393u, 3565833278u, |
10353 | 3414330886u, 1748785729u, |
10354 | 1023171602u, 580966986u, |
10355 | 2657385925u, 2124704694u, |
10356 | 233442446u, 1107045577u, |
10357 | 3899097693u, 1067532701u, |
10358 | 115667924u, 1406028344u, |
10359 | 2419657149u, 18613994u, |
10360 | 2532882091u, 3476683808u, |
10361 | 895961699u, 3762914298u, |
10362 | 1328752423u, 1844996900u, |
10363 | 1210281744u, 904215228u, |
10364 | 4055325594u, 1118521573u, |
10365 | 3996647489u, 3657647605u, |
10366 | 325254059u, 3136157065u, |
10367 | 3341068436u, 2287683323u, |
10368 | 1313073005u, 126005630u, |
10369 | 853746559u, 3555092974u, |
10370 | 2689238752u, 49515858u, |
10371 | 61073168u, 1010661841u, |
10372 | 1269521335u, 1902040126u, |
10373 | 3858321250u, 1400735275u, |
10374 | 2974699176u, 2771676666u, |
10375 | 545726212u, 2225229957u, |
10376 | 1086473152u, 3454177594u, |
10377 | 2088002891u, 2883475137u, |
10378 | 3222194252u, 4144472319u, |
10379 | 567988835u, 1051332394u, |
10380 | 3932046135u, 542648229u, |
10381 | 162888005u, 1669710469u, |
10382 | 1492500905u, 553041029u, |
10383 | 3817492747u, 584127807u, |
10384 | 4147115982u, 2993670925u, |
10385 | 3509733475u, 3587959456u, |
10386 | 2088550465u, 1745399498u, |
10387 | 869648362u, 1404723176u, |
10388 | 3947542735u, 1334333531u, |
10389 | 59634866u, 3239516985u, |
10390 | 3844250972u, 1275954779u, |
10391 | 2512155003u, 1685649437u, |
10392 | 639306006u, 2524620206u, |
10393 | 576786501u, 655707039u, |
10394 | 2864351838u, 3736264674u, |
10395 | 1200907897u, 2384379464u, |
10396 | 15823708u, 206117476u, |
10397 | 1193310960u, 1093099415u, |
10398 | 3696538026u, 4112584792u, |
10399 | 2069527017u, 547588820u, |
10400 | 4178147211u, 2827259351u, |
10401 | 940846775u, 1054995047u, |
10402 | 2976960697u, 1934305529u, |
10403 | 2199137382u, 1005722394u, |
10404 | 1875867180u, 2064356511u, |
10405 | 4019734130u, 3096333006u, |
10406 | 2069509024u, 2906358341u, |
10407 | 2232866485u, 1456016086u, |
10408 | 1422674894u, 867282151u, |
10409 | 1612503136u, 1739843072u, |
10410 | 134947567u, 2978775774u, |
10411 | 1284167756u, 1090844589u, |
10412 | 831688783u, 2079216362u, |
10413 | 1626991196u, 3644714163u, |
10414 | 3678110059u, 898470030u, |
10415 | 3916646913u, 3182422972u, |
10416 | 3630426828u, 969847973u, |
10417 | 3427164640u, 3463937250u, |
10418 | 3044785046u, 897322257u, |
10419 | 3443872170u, 4185408854u, |
10420 | 2557463241u, 4080940424u, |
10421 | 2048168570u, 2429169982u, |
10422 | 3174690447u, 2513494106u, |
10423 | 1213061732u, 3143736628u, |
10424 | 3482268149u, 1250714337u, |
10425 | 31648125u, 3872383625u, |
10426 | 1565760579u, 36665130u, |
10427 | 751041229u, 2257179590u, |
10428 | 2915361862u, 280819225u, |
10429 | 2907818413u, 4254297769u, |
10430 | 3493178615u, 3755944354u, |
10431 | 4043533423u, 1134196225u, |
10432 | 4177134659u, 127246419u, |
10433 | 2442615581u, 923049607u, |
10434 | 1004426206u, 782768297u, |
10435 | 2410586681u, 1430106871u, |
10436 | 4103323427u, 3168399477u, |
10437 | 3716682375u, 3616334719u, |
10438 | 3413209549u, 656672786u, |
10439 | 2876965944u, 182894450u, |
10440 | 456581318u, 2683752067u, |
10441 | 3877875910u, 3190666241u, |
10442 | 3240336907u, 4024807233u, |
10443 | 1681224377u, 1576191191u, |
10444 | 3599250276u, 2381111980u, |
10445 | 3495321877u, 3956024585u, |
10446 | 1611608524u, 3815677453u, |
10447 | 2062334396u, 1656117707u, |
10448 | 5457134u, 3234118251u, |
10449 | 470187419u, 2688566989u, |
10450 | 3259870297u, 660100446u, |
10451 | 442236198u, 2542452448u, |
10452 | 493137955u, 392411099u, |
10453 | 947967568u, 1234595917u, |
10454 | 4230082284u, 2762976773u, |
10455 | 2870085764u, 1455086530u, |
10456 | 2762099647u, 4011882747u, |
10457 | 1215981925u, 3227517889u, |
10458 | 3269061963u, 4037515364u, |
10459 | 3168911474u, 4255057396u, |
10460 | 2026092260u, 1736192508u, |
10461 | 3909727042u, 3114708966u, |
10462 | 1938800693u, 680793595u, |
10463 | 1525265867u, 2808224480u, |
10464 | 2122290603u, 1211197714u, |
10465 | 3520488321u, 3979192396u, |
10466 | 3540779343u, 4192918639u, |
10467 | 2736030448u, 1120335563u, |
10468 | 1698949078u, 3993310631u, |
10469 | 1966048551u, 2228221363u, |
10470 | 597941119u, 3498018399u, |
10471 | 393987327u, 454500547u, |
10472 | 1222959566u, 567151340u, |
10473 | 3774764786u, 1492844524u, |
10474 | 3308300614u, 805568076u, |
10475 | 868414882u, 177406999u, |
10476 | 1608110313u, 642061169u, |
10477 | 1027515771u, 3131251981u, |
10478 | 2851936150u, 4272755262u, |
10479 | 1532845092u, 709643652u, |
10480 | 682573592u, 1244104217u, |
10481 | 796769556u, 2500467040u, |
10482 | 3002618826u, 1112998535u, |
10483 | 1780193104u, 1243644607u, |
10484 | 3691719535u, 2958853053u, |
10485 | 466635014u, 2277292580u, |
10486 | 4082276003u, 1030800045u, |
10487 | 1750863246u, 379050598u, |
10488 | 3576413281u, 731493104u, |
10489 | 132259176u, 4115195437u, |
10490 | 1769890695u, 2715470335u, |
10491 | 1819263183u, 2028531518u, |
10492 | 2154809766u, 3672399742u, |
10493 | 76727603u, 4198182186u, |
10494 | 2304993586u, 1666387627u, |
10495 | 284366017u, 3359785538u, |
10496 | 3469807328u, 2926494787u, |
10497 | 3829072836u, 2493478921u, |
10498 | 3738499303u, 3311304980u, |
10499 | 932916545u, 2235559063u, |
10500 | 2909742396u, 1765719309u, |
10501 | 1456588655u, 508290328u, |
10502 | 1490719640u, 3356513470u, |
10503 | 2908490783u, 251085588u, |
10504 | 830410677u, 3172220325u, |
10505 | 3897208579u, 1940535730u, |
10506 | 151909546u, 2384458112u, |
10507 | }; |
10508 | |
10509 | // Return false only if offset is -1 and a spot check of 3 hashes all yield 0. |
10510 | bool Test(int offset, int len = 0) { |
10511 | #undef Check |
10512 | #undef IsAlive |
10513 | |
10514 | #define Check(x) do { \ |
10515 | const uint32_t actual = (x), e = expected[index++]; \ |
10516 | bool ok = actual == e; \ |
10517 | if (!ok) { \ |
10518 | cerr << "expected " << hex << e << " but got " << actual << endl; \ |
10519 | ++errors; \ |
10520 | } \ |
10521 | assert(ok); \ |
10522 | } while (0) |
10523 | |
10524 | #define IsAlive(x) do { alive += IsNonZero(x); } while (0) |
10525 | |
10526 | // After the following line is where the uses of "Check" and such will go. |
10527 | static int index = 0; |
10528 | if (offset == -1) { int alive = 0; { uint64_t h = farmhashuo::Hash64WithSeed(data, len++, SEED); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashuo::Hash64(data, len++); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashuo::Hash64(data, len++); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } len -= 3; return alive > 0; } |
10529 | { uint64_t h = farmhashuo::Hash64WithSeed(data + offset, len, SEED); Check(h >> 32); Check((h << 32) >> 32); } |
10530 | { uint64_t h = farmhashuo::Hash64(data + offset, len); Check(h >> 32); Check((h << 32) >> 32); } |
10531 | |
10532 | return true; |
10533 | #undef Check |
10534 | #undef IsAlive |
10535 | } |
10536 | |
10537 | int RunTest() { |
10538 | Setup(); |
10539 | int i = 0; |
10540 | cout << "Running farmhashuoTest" ; |
10541 | if (!Test(-1)) { |
10542 | cout << "... Unavailable\n" ; |
10543 | return NoteErrors(); |
10544 | } |
10545 | // Good. The function is attempting to hash, so run the full test. |
10546 | int errors_prior_to_test = errors; |
10547 | for ( ; i < kTestSize - 1; i++) { |
10548 | Test(i * i, i); |
10549 | } |
10550 | for ( ; i < kDataSize; i += i / 7) { |
10551 | Test(0, i); |
10552 | } |
10553 | Test(0, kDataSize); |
10554 | cout << (errors == errors_prior_to_test ? "... OK\n" : "... Failed\n" ); |
10555 | return NoteErrors(); |
10556 | } |
10557 | |
10558 | #else |
10559 | |
10560 | // After the following line is where the code to print hash codes will go. |
10561 | void Dump(int offset, int len) { |
10562 | { uint64_t h = farmhashuo::Hash64WithSeed(data + offset, len, SEED); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
10563 | { uint64_t h = farmhashuo::Hash64(data + offset, len); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
10564 | } |
10565 | |
10566 | #endif |
10567 | |
10568 | #undef SEED |
10569 | #undef SEED1 |
10570 | #undef SEED0 |
10571 | |
10572 | } // namespace farmhashuoTest |
10573 | |
10574 | #if TESTING |
10575 | |
10576 | static int farmhashuoTestResult = farmhashuoTest::RunTest(); |
10577 | |
10578 | #else |
10579 | int main(int argc, char** argv) { |
10580 | Setup(); |
10581 | cout << "uint32_t expected[] = {\n" ; |
10582 | int i = 0; |
10583 | for ( ; i < kTestSize - 1; i++) { |
10584 | farmhashuoTest::Dump(i * i, i); |
10585 | } |
10586 | for ( ; i < kDataSize; i += i / 7) { |
10587 | farmhashuoTest::Dump(0, i); |
10588 | } |
10589 | farmhashuoTest::Dump(0, kDataSize); |
10590 | cout << "};\n" ; |
10591 | } |
10592 | #endif |
10593 | #ifndef FARMHASH_SELF_TEST_GUARD |
10594 | #define FARMHASH_SELF_TEST_GUARD |
10595 | #include <cstdio> |
10596 | #include <iostream> |
10597 | #include <string.h> |
10598 | |
10599 | using std::cout; |
10600 | using std::cerr; |
10601 | using std::endl; |
10602 | using std::hex; |
10603 | |
10604 | static const uint64_t kSeed0 = 1234567; |
10605 | static const uint64_t kSeed1 = k0; |
10606 | static const int kDataSize = 1 << 20; |
10607 | static const int kTestSize = 300; |
10608 | #define kSeed128 Uint128(kSeed0, kSeed1) |
10609 | |
10610 | static char data[kDataSize]; |
10611 | |
10612 | static int completed_self_tests = 0; |
10613 | static int errors = 0; |
10614 | |
10615 | // Initialize data to pseudorandom values. |
10616 | void Setup() { |
10617 | if (completed_self_tests == 0) { |
10618 | uint64_t a = 9; |
10619 | uint64_t b = 777; |
10620 | for (int i = 0; i < kDataSize; i++) { |
10621 | a += b; |
10622 | b += a; |
10623 | a = (a ^ (a >> 41)) * k0; |
10624 | b = (b ^ (b >> 41)) * k0 + i; |
10625 | uint8_t u = b >> 37; |
10626 | memcpy(data + i, &u, 1); // uint8_t -> char |
10627 | } |
10628 | } |
10629 | } |
10630 | |
10631 | int NoteErrors() { |
10632 | #define NUM_SELF_TESTS 9 |
10633 | if (++completed_self_tests == NUM_SELF_TESTS) |
10634 | std::exit(errors > 0); |
10635 | return errors; |
10636 | } |
10637 | |
10638 | template <typename T> inline bool IsNonZero(T x) { |
10639 | return x != 0; |
10640 | } |
10641 | |
10642 | template <> inline bool IsNonZero<uint128_t>(uint128_t x) { |
10643 | return x != Uint128(0, 0); |
10644 | } |
10645 | |
10646 | #endif // FARMHASH_SELF_TEST_GUARD |
10647 | |
10648 | namespace farmhashxoTest { |
10649 | |
10650 | uint32_t CreateSeed(int offset, int salt) { |
10651 | uint32_t h = static_cast<uint32_t>(salt & 0xffffffff); |
10652 | h = h * c1; |
10653 | h ^= (h >> 17); |
10654 | h = h * c1; |
10655 | h ^= (h >> 17); |
10656 | h = h * c1; |
10657 | h ^= (h >> 17); |
10658 | h += static_cast<uint32_t>(offset & 0xffffffff); |
10659 | h = h * c1; |
10660 | h ^= (h >> 17); |
10661 | h = h * c1; |
10662 | h ^= (h >> 17); |
10663 | h = h * c1; |
10664 | h ^= (h >> 17); |
10665 | return h; |
10666 | } |
10667 | |
10668 | #undef SEED |
10669 | #undef SEED1 |
10670 | #undef SEED0 |
10671 | #define SEED CreateSeed(offset, -1) |
10672 | #define SEED0 CreateSeed(offset, 0) |
10673 | #define SEED1 CreateSeed(offset, 1) |
10674 | |
10675 | #undef TESTING |
10676 | #define TESTING 1 |
10677 | #if TESTING |
10678 | uint32_t expected[] = { |
10679 | 1140953930u, 861465670u, |
10680 | 3277735313u, 2681724312u, |
10681 | 2598464059u, 797982799u, |
10682 | 890626835u, 800175912u, |
10683 | 2603993599u, 921001710u, |
10684 | 1410420968u, 2134990486u, |
10685 | 3283896453u, 1867689945u, |
10686 | 2914424215u, 2244477846u, |
10687 | 255297188u, 2992121793u, |
10688 | 1110588164u, 4186314283u, |
10689 | 161451183u, 3943596029u, |
10690 | 4019337850u, 452431531u, |
10691 | 283198166u, 2741341286u, |
10692 | 3379021470u, 2557197665u, |
10693 | 299850021u, 2532580744u, |
10694 | 452473466u, 1706958772u, |
10695 | 1298374911u, 3099673830u, |
10696 | 2199864459u, 3696623795u, |
10697 | 236935126u, 2976578695u, |
10698 | 4055299123u, 3281581178u, |
10699 | 1053458494u, 1882212500u, |
10700 | 2305012065u, 2169731866u, |
10701 | 3456121707u, 275903667u, |
10702 | 458884671u, 3033004529u, |
10703 | 3058973506u, 2379411653u, |
10704 | 1898235244u, 1402319660u, |
10705 | 2700149065u, 2699376854u, |
10706 | 147814787u, 720739346u, |
10707 | 2433714046u, 4222949502u, |
10708 | 4220361840u, 1712034059u, |
10709 | 3425469811u, 3690733394u, |
10710 | 4148372108u, 1330324210u, |
10711 | 594028478u, 2921867846u, |
10712 | 1635026870u, 192883107u, |
10713 | 780716741u, 1728752234u, |
10714 | 3280331829u, 326029180u, |
10715 | 3969463346u, 1436364519u, |
10716 | 393215742u, 3349570000u, |
10717 | 3824583307u, 1612122221u, |
10718 | 2859809759u, 3808705738u, |
10719 | 1379537552u, 1646032583u, |
10720 | 2233466664u, 1432476832u, |
10721 | 4023053163u, 2650381482u, |
10722 | 2052294713u, 3552092450u, |
10723 | 1628777059u, 1499109081u, |
10724 | 3476440786u, 3829307897u, |
10725 | 2960536756u, 1554038301u, |
10726 | 1145519619u, 3190844552u, |
10727 | 2902102606u, 3600725550u, |
10728 | 237495366u, 540224401u, |
10729 | 65721842u, 489963606u, |
10730 | 1448662590u, 397635823u, |
10731 | 1596489240u, 1562872448u, |
10732 | 1790705123u, 2128624475u, |
10733 | 180854224u, 2604346966u, |
10734 | 1435705557u, 1262831810u, |
10735 | 155445229u, 1672724608u, |
10736 | 1669465176u, 1341975128u, |
10737 | 663607706u, 2077310004u, |
10738 | 3610042449u, 1911523866u, |
10739 | 1043692997u, 1454396064u, |
10740 | 2563776023u, 294527927u, |
10741 | 1099072299u, 1389770549u, |
10742 | 703505868u, 678706990u, |
10743 | 2952353448u, 2026137563u, |
10744 | 3603803785u, 629449419u, |
10745 | 1933894405u, 3043213226u, |
10746 | 226132789u, 2489287368u, |
10747 | 1552847036u, 645684964u, |
10748 | 3828089804u, 3632594520u, |
10749 | 187883449u, 230403464u, |
10750 | 3151491850u, 3272648435u, |
10751 | 3729087873u, 1303930448u, |
10752 | 2002861219u, 165370827u, |
10753 | 916494250u, 1230085527u, |
10754 | 3103338579u, 3064290191u, |
10755 | 3807265751u, 3628174014u, |
10756 | 231181488u, 851743255u, |
10757 | 2295806711u, 1781190011u, |
10758 | 2988893883u, 1554380634u, |
10759 | 1142264800u, 3667013118u, |
10760 | 1968445277u, 315203929u, |
10761 | 2638023604u, 2290487377u, |
10762 | 732137533u, 1909203251u, |
10763 | 440398219u, 1891630171u, |
10764 | 1380301172u, 1498556724u, |
10765 | 4072067757u, 4165088768u, |
10766 | 4204318635u, 441430649u, |
10767 | 3931792696u, 197618179u, |
10768 | 956300927u, 914413116u, |
10769 | 3010839769u, 2837339569u, |
10770 | 2148126371u, 1913303225u, |
10771 | 3074915312u, 3117299654u, |
10772 | 4139181436u, 2993479124u, |
10773 | 3178848746u, 1357272220u, |
10774 | 1438494951u, 507436733u, |
10775 | 667183474u, 2084369203u, |
10776 | 3854939912u, 1413396341u, |
10777 | 126024219u, 146044391u, |
10778 | 1016656857u, 3022024459u, |
10779 | 3254014218u, 429095991u, |
10780 | 990500595u, 3056862311u, |
10781 | 985653208u, 1718653828u, |
10782 | 623071693u, 366414107u, |
10783 | 1771289760u, 2293458109u, |
10784 | 3047342438u, 2991127487u, |
10785 | 3120876698u, 1684583131u, |
10786 | 3638043310u, 1170404994u, |
10787 | 863214540u, 1087193030u, |
10788 | 199124911u, 520792961u, |
10789 | 3169775996u, 1577421232u, |
10790 | 3331828431u, 1013201099u, |
10791 | 1716848157u, 4033596884u, |
10792 | 1770708857u, 4229339322u, |
10793 | 1146169032u, 1434258493u, |
10794 | 3824360466u, 3242407770u, |
10795 | 1926419493u, 2649785113u, |
10796 | 872586426u, 762243036u, |
10797 | 2736953692u, 816692935u, |
10798 | 1571283333u, 3555213933u, |
10799 | 2266795890u, 3781899767u, |
10800 | 4290630595u, 517646945u, |
10801 | 3006163611u, 2180594090u, |
10802 | 959214578u, 558910384u, |
10803 | 1283799121u, 3047062993u, |
10804 | 3830962609u, 2391606125u, |
10805 | 3544509313u, 622325861u, |
10806 | 834785312u, 382936554u, |
10807 | 1421463872u, 788479970u, |
10808 | 1825135056u, 2725923798u, |
10809 | 580988377u, 2826990641u, |
10810 | 247825043u, 3167748333u, |
10811 | 812546227u, 2506885666u, |
10812 | 2584372201u, 1758123094u, |
10813 | 1891789696u, 389974094u, |
10814 | 345313518u, 2022370576u, |
10815 | 3886113119u, 3338548567u, |
10816 | 1083486947u, 2583576230u, |
10817 | 1776047957u, 1771384107u, |
10818 | 3604937815u, 3198590202u, |
10819 | 3027522813u, 4155628142u, |
10820 | 4232136669u, 427759438u, |
10821 | 4244322689u, 542201663u, |
10822 | 1549591985u, 2856634168u, |
10823 | 556609672u, 45845311u, |
10824 | 1175961330u, 3948351189u, |
10825 | 4165739882u, 4194218315u, |
10826 | 1634635545u, 4151937410u, |
10827 | 713127376u, 1467786451u, |
10828 | 1327394015u, 2743592929u, |
10829 | 2638154051u, 810082938u, |
10830 | 3077742128u, 1062268187u, |
10831 | 4084325664u, 3810665822u, |
10832 | 3735739145u, 2794294783u, |
10833 | 2335576331u, 2560479831u, |
10834 | 690240711u, 997658837u, |
10835 | 2442302747u, 3948961926u, |
10836 | 3958366652u, 3067277639u, |
10837 | 2059157774u, 1211737169u, |
10838 | 1516711748u, 2339636583u, |
10839 | 4188504038u, 59581167u, |
10840 | 2767897792u, 1389679610u, |
10841 | 2658147000u, 2643979752u, |
10842 | 3758739543u, 4189944477u, |
10843 | 1454470782u, 100876854u, |
10844 | 2995362413u, 118817200u, |
10845 | 3252925478u, 2062343506u, |
10846 | 2804483644u, 3088828656u, |
10847 | 1231633714u, 4168280671u, |
10848 | 2931588131u, 3284356565u, |
10849 | 1255909792u, 3130054947u, |
10850 | 4173605289u, 1407328702u, |
10851 | 1677744031u, 3532596884u, |
10852 | 3162657845u, 3887208531u, |
10853 | 2256541290u, 3459463480u, |
10854 | 3740979556u, 259034107u, |
10855 | 392987633u, 3233195759u, |
10856 | 3606709555u, 3424793077u, |
10857 | 315836068u, 3200749877u, |
10858 | 4065431359u, 760633989u, |
10859 | 2982018998u, 1811050648u, |
10860 | 234531934u, 1115203611u, |
10861 | 3897494162u, 1516407838u, |
10862 | 1603559457u, 323296368u, |
10863 | 2632963283u, 1778459926u, |
10864 | 2879836826u, 2146672889u, |
10865 | 3486330348u, 492621815u, |
10866 | 1231665285u, 2457048126u, |
10867 | 3438440082u, 2217471853u, |
10868 | 3355404249u, 3275550588u, |
10869 | 1052645068u, 862072556u, |
10870 | 4110617119u, 3745267835u, |
10871 | 2657392572u, 4279236653u, |
10872 | 1688445808u, 701920051u, |
10873 | 956734128u, 581695350u, |
10874 | 3157862788u, 2585726058u, |
10875 | 1192588249u, 1410111809u, |
10876 | 1651193125u, 3326135446u, |
10877 | 1073280453u, 97376972u, |
10878 | 2513844237u, 2187968410u, |
10879 | 3976859649u, 4267859263u, |
10880 | 3429034542u, 564493077u, |
10881 | 3000537321u, 479241367u, |
10882 | 3845637831u, 2868987960u, |
10883 | 51544337u, 1029173765u, |
10884 | 393624922u, 704325635u, |
10885 | 2357610553u, 1418509533u, |
10886 | 2007814586u, 3866658271u, |
10887 | 3082385053u, 735688735u, |
10888 | 916110004u, 3283299459u, |
10889 | 1051684175u, 1083796807u, |
10890 | 4074716319u, 813690332u, |
10891 | 144264390u, 1439630796u, |
10892 | 1508556987u, 675582689u, |
10893 | 3748881891u, 3195309868u, |
10894 | 362884708u, 1616408198u, |
10895 | 43233176u, 837301135u, |
10896 | 881504822u, 3254795114u, |
10897 | 1385506591u, 2799925823u, |
10898 | 1469874582u, 3464841997u, |
10899 | 497175391u, 3929484338u, |
10900 | 3975771289u, 1798536177u, |
10901 | 2926265846u, 1374242438u, |
10902 | 3675707838u, 4205965408u, |
10903 | 3153165629u, 1499475160u, |
10904 | 187287713u, 548490821u, |
10905 | 3255259608u, 4247675634u, |
10906 | 1940181471u, 3779953975u, |
10907 | 687167150u, 2319566715u, |
10908 | 1742785722u, 785893184u, |
10909 | 2296977392u, 2778575413u, |
10910 | 1794720651u, 48131484u, |
10911 | 4084891412u, 1160134629u, |
10912 | 3737623280u, 823113169u, |
10913 | 3423207646u, 3803213486u, |
10914 | 710625654u, 4116162021u, |
10915 | 3693420287u, 4167766971u, |
10916 | 1666602807u, 295320990u, |
10917 | 3513255468u, 2487440590u, |
10918 | 234080704u, 4004655503u, |
10919 | 2971762528u, 1479656873u, |
10920 | 4090178629u, 4044418876u, |
10921 | 391947536u, 1462554406u, |
10922 | 3909295855u, 1239580330u, |
10923 | 1515601363u, 2011102035u, |
10924 | 1442068334u, 4265993528u, |
10925 | 1191921695u, 2291355695u, |
10926 | 4257172787u, 576405853u, |
10927 | 314332944u, 4038839101u, |
10928 | 55559918u, 2378985842u, |
10929 | 711098718u, 2425317635u, |
10930 | 1644327317u, 1401013391u, |
10931 | 4193760037u, 2958260436u, |
10932 | 3167371443u, 3062418115u, |
10933 | 3800755475u, 3167030094u, |
10934 | 3489648204u, 1405430357u, |
10935 | 526177822u, 2602636307u, |
10936 | 915406019u, 4264167741u, |
10937 | 1484090483u, 3070944737u, |
10938 | 254529415u, 4017058800u, |
10939 | 1702710265u, 1029665228u, |
10940 | 2000382906u, 3185573940u, |
10941 | 1381258384u, 4036354071u, |
10942 | 2900841028u, 2670703363u, |
10943 | 2921748807u, 2899069938u, |
10944 | 4130543625u, 688472265u, |
10945 | 4186808827u, 1054670286u, |
10946 | 1132985391u, 2840525968u, |
10947 | 4175776103u, 338058159u, |
10948 | 1735964501u, 1539305024u, |
10949 | 3497121710u, 1568260669u, |
10950 | 2227290760u, 146827036u, |
10951 | 3977176001u, 4060134777u, |
10952 | 857488494u, 250055052u, |
10953 | 4284109679u, 2502815838u, |
10954 | 2592281721u, 1603444633u, |
10955 | 1390562014u, 1556658131u, |
10956 | 616327404u, 2448966429u, |
10957 | 3051191726u, 3891353218u, |
10958 | 1213304082u, 762328245u, |
10959 | 2239052397u, 1082330589u, |
10960 | 2455957292u, 201837927u, |
10961 | 405397452u, 3079886794u, |
10962 | 2583939798u, 2848283092u, |
10963 | 3750724631u, 883849006u, |
10964 | 3204198988u, 3341327098u, |
10965 | 1855234968u, 1982110346u, |
10966 | 1485529487u, 541496720u, |
10967 | 4117290321u, 3607433551u, |
10968 | 2168864636u, 133643215u, |
10969 | 1055817409u, 3847827123u, |
10970 | 2960769387u, 4046101649u, |
10971 | 1176127003u, 4015671361u, |
10972 | 4243643405u, 2849988118u, |
10973 | 517111221u, 1796672358u, |
10974 | 2045051700u, 3452457457u, |
10975 | 2948254999u, 2102063419u, |
10976 | 1556410577u, 1536380876u, |
10977 | 3776661467u, 3281002516u, |
10978 | 1735616066u, 1539151988u, |
10979 | 1087795162u, 3332431596u, |
10980 | 685631442u, 1147951686u, |
10981 | 95237878u, 2005032160u, |
10982 | 4012206915u, 4224354805u, |
10983 | 3204999386u, 2415262714u, |
10984 | 1433635018u, 116647396u, |
10985 | 83167836u, 2881562655u, |
10986 | 2729416454u, 1029284767u, |
10987 | 881378302u, 2159170082u, |
10988 | 555057366u, 1169104445u, |
10989 | 3963877000u, 1919171906u, |
10990 | 336034862u, 2017579106u, |
10991 | 4059340529u, 3020819343u, |
10992 | 865146997u, 2473524405u, |
10993 | 944743644u, 1694443528u, |
10994 | 1804513294u, 2904752429u, |
10995 | 617975720u, 3671562289u, |
10996 | 260177668u, 505662155u, |
10997 | 1885941445u, 2504509403u, |
10998 | 2260041112u, 1019936943u, |
10999 | 3722741628u, 1511077569u, |
11000 | 3100701179u, 1379422864u, |
11001 | 1535670711u, 773792826u, |
11002 | 1103819072u, 2089123665u, |
11003 | 1157547425u, 329152940u, |
11004 | 4142587430u, 484732447u, |
11005 | 2475035432u, 1120017626u, |
11006 | 412145504u, 965125959u, |
11007 | 324924679u, 2809286837u, |
11008 | 2842141483u, 4029205195u, |
11009 | 2974306813u, 515627448u, |
11010 | 3791551981u, 1097806406u, |
11011 | 3873078673u, 136118734u, |
11012 | 1872130856u, 3632422367u, |
11013 | 3574135531u, 4017075736u, |
11014 | 1699452298u, 1403506686u, |
11015 | 344414660u, 1189129691u, |
11016 | 3487080616u, 1516736273u, |
11017 | 1805475756u, 2562064338u, |
11018 | 163335594u, 2732147834u, |
11019 | 4077452507u, 2984955003u, |
11020 | 4271866024u, 3071338162u, |
11021 | 2347111903u, 873829983u, |
11022 | 1948409509u, 1923531348u, |
11023 | 459509140u, 771592405u, |
11024 | 1750124750u, 2334938333u, |
11025 | 213811117u, 2586632018u, |
11026 | 185232757u, 4032960199u, |
11027 | 2447383637u, 284777551u, |
11028 | 1654276320u, 2687561076u, |
11029 | 3512945009u, 308584855u, |
11030 | 1861027147u, 4102279334u, |
11031 | 3203802620u, 1692079268u, |
11032 | 4250142168u, 2565680167u, |
11033 | 1507046104u, 841195925u, |
11034 | 520565830u, 3674576684u, |
11035 | 38924274u, 3770488806u, |
11036 | 2414430882u, 3978473838u, |
11037 | 3703994407u, 69201295u, |
11038 | 3099963860u, 1255084262u, |
11039 | 690971838u, 3539996781u, |
11040 | 3696902571u, 3593730713u, |
11041 | 2363435042u, 54945052u, |
11042 | 1785765213u, 184911581u, |
11043 | 1586241476u, 1939595371u, |
11044 | 2534883189u, 2432427547u, |
11045 | 2374171993u, 2039128933u, |
11046 | 2955715987u, 2295501078u, |
11047 | 2741583197u, 1280920000u, |
11048 | 686818699u, 1238742497u, |
11049 | 3843660102u, 82177963u, |
11050 | 1281043691u, 1121403845u, |
11051 | 1697846708u, 284852964u, |
11052 | 278661677u, 2889101923u, |
11053 | 2127558730u, 713121337u, |
11054 | 872502474u, 511142139u, |
11055 | 1261140657u, 1747052377u, |
11056 | 2108187161u, 927011680u, |
11057 | 955328267u, 3821994995u, |
11058 | 2707230761u, 4142246789u, |
11059 | 4134691985u, 1958963937u, |
11060 | 2498463509u, 1977988705u, |
11061 | 1419293714u, 1636932722u, |
11062 | 2567532373u, 4075249328u, |
11063 | 240575705u, 1956681213u, |
11064 | 2598802768u, 2025886508u, |
11065 | 4104757832u, 3026358429u, |
11066 | 3242615202u, 4026813725u, |
11067 | 255108733u, 1845587644u, |
11068 | 3573008472u, 3615577014u, |
11069 | 1222733548u, 1205557630u, |
11070 | 917608574u, 1363253259u, |
11071 | 1541946015u, 3087190425u, |
11072 | 1138008081u, 1444019663u, |
11073 | 109793386u, 341851980u, |
11074 | 857839960u, 2515339233u, |
11075 | 156283211u, 1906768669u, |
11076 | 3886713057u, 1276595523u, |
11077 | 2809830736u, 460237542u, |
11078 | 3420452099u, 142985419u, |
11079 | 205970448u, 4198897105u, |
11080 | 1950698961u, 2069753399u, |
11081 | 1142216925u, 1113051162u, |
11082 | 1033680610u, 4278599955u, |
11083 | 1106466069u, 356742959u, |
11084 | 531521052u, 3494863964u, |
11085 | 225629455u, 3735275001u, |
11086 | 3662626864u, 1750561299u, |
11087 | 1012864651u, 2101846429u, |
11088 | 1074553219u, 668829411u, |
11089 | 992181339u, 3384018814u, |
11090 | 3330664522u, 860966321u, |
11091 | 1885071395u, 4233785523u, |
11092 | 100741310u, 451656820u, |
11093 | 2148187612u, 1063001151u, |
11094 | 360256231u, 107312677u, |
11095 | 3650357479u, 2390172694u, |
11096 | 22452685u, 237319043u, |
11097 | 3600462351u, 1216645846u, |
11098 | 2088767754u, 164402616u, |
11099 | 2418980170u, 926137824u, |
11100 | 94638678u, 1689811113u, |
11101 | 2751052984u, 1767810825u, |
11102 | 271289013u, 3896132233u, |
11103 | 103797041u, 1397772514u, |
11104 | 3441135892u, 3323383489u, |
11105 | 2491268371u, 1662561885u, |
11106 | 1612872497u, 2986430557u, |
11107 | 2756998822u, 207428029u, |
11108 | 937973965u, 2791656726u, |
11109 | 1949717207u, 2260498180u, |
11110 | 2648427775u, 2360400900u, |
11111 | 2080496169u, 486358863u, |
11112 | 1582022990u, 1263709570u, |
11113 | 1396468647u, 1377764574u, |
11114 | 363008508u, 1293502429u, |
11115 | 224580012u, 4252610345u, |
11116 | 1435134775u, 1099809675u, |
11117 | 533671980u, 1533438766u, |
11118 | 1820532305u, 2776960536u, |
11119 | 3374512975u, 3542220540u, |
11120 | 822810075u, 3716663290u, |
11121 | 1157398049u, 3752806924u, |
11122 | 4081637863u, 337070226u, |
11123 | 3866585976u, 359270190u, |
11124 | 2110942730u, 3267551635u, |
11125 | 644850146u, 1306761320u, |
11126 | 746972907u, 934259457u, |
11127 | 2341378668u, 2220373824u, |
11128 | 1242645122u, 4109252858u, |
11129 | 1625266099u, 1173698481u, |
11130 | 383517064u, 896322512u, |
11131 | 3377483696u, 1788337208u, |
11132 | 455496839u, 3194373887u, |
11133 | 1837689083u, 1336556841u, |
11134 | 1658628529u, 2911512007u, |
11135 | 3838343487u, 2757664765u, |
11136 | 1537187340u, 3712582785u, |
11137 | 367022558u, 3071359622u, |
11138 | 3926147070u, 35432879u, |
11139 | 3093195926u, 2561488770u, |
11140 | 4273132307u, 3898950547u, |
11141 | 2838251049u, 2103926083u, |
11142 | 2549435227u, 536047554u, |
11143 | 1858986613u, 2040551642u, |
11144 | 1147412575u, 1972369852u, |
11145 | 4166184983u, 3528794619u, |
11146 | 4077477194u, 3565689036u, |
11147 | 808048238u, 3826350461u, |
11148 | 1359641525u, 1197100813u, |
11149 | 265993036u, 1864569342u, |
11150 | 725164342u, 2264788336u, |
11151 | 1831223342u, 3329594980u, |
11152 | 923017956u, 490608221u, |
11153 | 3818634478u, 258154469u, |
11154 | 1441714797u, 1174785921u, |
11155 | 3833372385u, 3287246572u, |
11156 | 1677395563u, 3569218731u, |
11157 | 868981704u, 2163330264u, |
11158 | 2649450292u, 500120236u, |
11159 | 465161780u, 746438382u, |
11160 | 1145009669u, 2520062970u, |
11161 | 2810524030u, 1561519055u, |
11162 | 1479878006u, 3864969305u, |
11163 | 2686075657u, 4042710240u, |
11164 | 3224066062u, 2774151984u, |
11165 | 2226179547u, 1643626042u, |
11166 | 2328730865u, 3160666939u, |
11167 | 2107011431u, 96459446u, |
11168 | 3920328742u, 3336407558u, |
11169 | 829404209u, 1878067032u, |
11170 | 1235983679u, 4237425634u, |
11171 | 466519055u, 3870676863u, |
11172 | 934312076u, 2952135524u, |
11173 | 276949224u, 4100839753u, |
11174 | 424001484u, 1955120893u, |
11175 | 4015478120u, 1265237690u, |
11176 | 427484362u, 4246879223u, |
11177 | 3452969617u, 1724363362u, |
11178 | 1553513184u, 834830418u, |
11179 | 1858777639u, 3476334357u, |
11180 | 4144030366u, 2450047160u, |
11181 | 2950762705u, 4277111759u, |
11182 | 358032121u, 2511026735u, |
11183 | 167923105u, 2059208280u, |
11184 | 251949572u, 3065234219u, |
11185 | 1535473864u, 556796152u, |
11186 | 1513237478u, 3150857516u, |
11187 | 1103404394u, 198182691u, |
11188 | 1476438092u, 2913077464u, |
11189 | 207119516u, 3963810232u, |
11190 | 2954651680u, 1535115487u, |
11191 | 3051522276u, 4046477658u, |
11192 | 917804636u, 864395565u, |
11193 | 632704095u, 140762681u, |
11194 | 1802040304u, 990407433u, |
11195 | 3771506212u, 4106024923u, |
11196 | 1287729497u, 2198985327u, |
11197 | 4052924496u, 2926590471u, |
11198 | 3084557148u, 1472898694u, |
11199 | 1009870118u, 559702706u, |
11200 | 4265214507u, 82077489u, |
11201 | 3067891003u, 3295678907u, |
11202 | 2402308151u, 1096697687u, |
11203 | 464407878u, 4190838199u, |
11204 | 4269578403u, 3060919438u, |
11205 | 2899950405u, 3046872820u, |
11206 | 733509243u, 1583801700u, |
11207 | 40453902u, 3879773881u, |
11208 | 1993425202u, 2185339100u, |
11209 | 1877837196u, 3912423882u, |
11210 | 3293122640u, 4104318469u, |
11211 | 1679617763u, 3703603898u, |
11212 | 8759461u, 2540185277u, |
11213 | 1152198475u, 2038345882u, |
11214 | 2503579743u, 1446869792u, |
11215 | 2019419351u, 4051584612u, |
11216 | 3178289407u, 3992503830u, |
11217 | 2879018745u, 2719373510u, |
11218 | 700836153u, 1675560450u, |
11219 | 4121245793u, 2064715719u, |
11220 | 343595772u, 1996164093u, |
11221 | 3130433948u, 405251683u, |
11222 | 2804817126u, 1607133689u, |
11223 | 463852893u, 2864244470u, |
11224 | 2224044848u, 4071581802u, |
11225 | 2537107938u, 2246347953u, |
11226 | 3207234525u, 2028708916u, |
11227 | 2272418128u, 803575837u, |
11228 | 38655481u, 2170452091u, |
11229 | 3272166407u, 557660441u, |
11230 | 4019147902u, 3841480082u, |
11231 | 298459606u, 2600943364u, |
11232 | 2440657523u, 255451671u, |
11233 | 3424361375u, 779434428u, |
11234 | 3088526123u, 490671625u, |
11235 | 1322855877u, 3452203069u, |
11236 | 3057021940u, 2285701422u, |
11237 | 2014993457u, 2390431709u, |
11238 | 2002090272u, 1568745354u, |
11239 | 1783152480u, 823305654u, |
11240 | 4053862835u, 2200236540u, |
11241 | 3009412313u, 3184047862u, |
11242 | 3032187389u, 4159715581u, |
11243 | 2966902888u, 252986948u, |
11244 | 1849329144u, 3160134214u, |
11245 | 3420960112u, 3198900547u, |
11246 | 749160960u, 379139040u, |
11247 | 1208883495u, 1566527339u, |
11248 | 3006227299u, 4194096960u, |
11249 | 556075248u, 497404038u, |
11250 | 1717327230u, 1496132623u, |
11251 | 1775955687u, 1719108984u, |
11252 | 1014328900u, 4189966956u, |
11253 | 2108574735u, 2584236470u, |
11254 | 684087286u, 531310503u, |
11255 | 4264509527u, 773405691u, |
11256 | 3088905079u, 3456882941u, |
11257 | 3105682208u, 3382290593u, |
11258 | 2289363624u, 3296306400u, |
11259 | 4168438718u, 467441309u, |
11260 | 777173623u, 3241407531u, |
11261 | 1183994815u, 1132983260u, |
11262 | 1610606159u, 2540270567u, |
11263 | 2649684057u, 1397502982u, |
11264 | 146657385u, 3318434267u, |
11265 | 2109315753u, 3348545480u, |
11266 | 3193669211u, 811750340u, |
11267 | 1073256162u, 3571673088u, |
11268 | 546596661u, 1017047954u, |
11269 | 3403136990u, 2540585554u, |
11270 | 1477047647u, 4145867423u, |
11271 | 2826408201u, 3531646869u, |
11272 | 784952939u, 943914610u, |
11273 | 2717443875u, 3657384638u, |
11274 | 1806867885u, 1903578924u, |
11275 | 3985088434u, 1911188923u, |
11276 | 1764002686u, 3672748083u, |
11277 | 1832925325u, 241574049u, |
11278 | 519948041u, 3181425568u, |
11279 | 2939747257u, 1634174593u, |
11280 | 3429894862u, 3529565564u, |
11281 | 1089679033u, 240953857u, |
11282 | 2025369941u, 2695166650u, |
11283 | 517086873u, 2964595704u, |
11284 | 3017658263u, 3828377737u, |
11285 | 2144895011u, 994799311u, |
11286 | 1184683823u, 4260564140u, |
11287 | 308018483u, 4262383425u, |
11288 | 1374752558u, 3431057723u, |
11289 | 1572637805u, 383233885u, |
11290 | 3188015819u, 4051263539u, |
11291 | 233319221u, 3794788167u, |
11292 | 2017406667u, 919677938u, |
11293 | 4074952232u, 1683612329u, |
11294 | 4213676186u, 327142514u, |
11295 | 3032591014u, 4204155962u, |
11296 | 206775997u, 2283918569u, |
11297 | 2395147154u, 3427505379u, |
11298 | 2211319468u, 4153726847u, |
11299 | 2217060665u, 350160869u, |
11300 | 2493667051u, 1648200185u, |
11301 | 3441709766u, 1387233546u, |
11302 | 140980u, 1891558063u, |
11303 | 760080239u, 2088061981u, |
11304 | 1580964938u, 740563169u, |
11305 | 422986366u, 330624974u, |
11306 | 4264507722u, 150928357u, |
11307 | 2738323042u, 2948665536u, |
11308 | 918718096u, 376390582u, |
11309 | 3966098971u, 717653678u, |
11310 | 3219466255u, 3799363969u, |
11311 | 3424344721u, 3187805406u, |
11312 | 375347278u, 3490350144u, |
11313 | 1992212097u, 2263421398u, |
11314 | 3855037968u, 1928519266u, |
11315 | 3866327955u, 1129127000u, |
11316 | 1782515131u, 2746577402u, |
11317 | 3059200728u, 2108753646u, |
11318 | 2738070963u, 1336849395u, |
11319 | 1705302106u, 768287270u, |
11320 | 1343511943u, 2247006571u, |
11321 | 1956142255u, 1780259453u, |
11322 | 3475618043u, 212490675u, |
11323 | 622521957u, 917121602u, |
11324 | 1852992332u, 1267987847u, |
11325 | 3170016833u, 2549835613u, |
11326 | 3299763344u, 2864033668u, |
11327 | 3378768767u, 1236609378u, |
11328 | 4169365948u, 3738062408u, |
11329 | 2661022773u, 2006922227u, |
11330 | 2760592161u, 3828932355u, |
11331 | 2636387819u, 2616619070u, |
11332 | 1237256330u, 3449066284u, |
11333 | 2871755260u, 3729280948u, |
11334 | 3862686086u, 431292293u, |
11335 | 3285899651u, 786322314u, |
11336 | 2531158535u, 724901242u, |
11337 | 2377363130u, 1415970351u, |
11338 | 1244759631u, 3263135197u, |
11339 | 965248856u, 174024139u, |
11340 | 2297418515u, 2954777083u, |
11341 | 987586766u, 3206261120u, |
11342 | 4059515114u, 3903854066u, |
11343 | 1931934525u, 2287507921u, |
11344 | 1827135136u, 1781944746u, |
11345 | 574617451u, 2299034788u, |
11346 | 2650140034u, 4081586725u, |
11347 | 2482286699u, 1109175923u, |
11348 | 458483596u, 618705848u, |
11349 | 4059852729u, 1813855658u, |
11350 | 4190721328u, 1129462471u, |
11351 | 4089998050u, 3575732749u, |
11352 | 2375584220u, 1037031473u, |
11353 | 1623777358u, 3389003793u, |
11354 | 546597541u, 352770237u, |
11355 | 1383747654u, 3122687303u, |
11356 | 1646071378u, 1164309901u, |
11357 | 290870767u, 830691298u, |
11358 | 929335420u, 3193251135u, |
11359 | 989577914u, 3626554867u, |
11360 | 591974737u, 3996958215u, |
11361 | 3163711272u, 3071568023u, |
11362 | 1516846461u, 3656006011u, |
11363 | 2698625268u, 2510865430u, |
11364 | 340274176u, 1167681812u, |
11365 | 3698796465u, 3155218919u, |
11366 | 4102288238u, 1673474350u, |
11367 | 3069708839u, 2704165015u, |
11368 | 1237411891u, 1854985978u, |
11369 | 3646837503u, 3625406022u, |
11370 | 921552000u, 1712976649u, |
11371 | 3939149151u, 878608872u, |
11372 | 3406359248u, 1068844551u, |
11373 | 1834682077u, 4155949943u, |
11374 | 2437686324u, 3163786257u, |
11375 | 2645117577u, 1988168803u, |
11376 | 747285578u, 1626463554u, |
11377 | 1235300371u, 1256485167u, |
11378 | 1914142538u, 4141546431u, |
11379 | 3838102563u, 582664250u, |
11380 | 1883344352u, 2083771672u, |
11381 | 2611657933u, 2139079047u, |
11382 | 2250573853u, 804336148u, |
11383 | 3066325351u, 2770847216u, |
11384 | 4275641370u, 1455750577u, |
11385 | 3346357270u, 1674051445u, |
11386 | 601221482u, 3992583643u, |
11387 | 1402445097u, 3622527604u, |
11388 | 2509017299u, 2966108111u, |
11389 | 2557027816u, 900741486u, |
11390 | 1790771021u, 2912643797u, |
11391 | 2631381069u, 4014551783u, |
11392 | 90375300u, 300318232u, |
11393 | 3269968032u, 2679371729u, |
11394 | 2664752123u, 3517585534u, |
11395 | 3253901179u, 542270815u, |
11396 | 1188641600u, 365479232u, |
11397 | 2210121140u, 760762191u, |
11398 | 1273768482u, 1216399252u, |
11399 | 3484324231u, 4287337666u, |
11400 | 16322182u, 643179562u, |
11401 | 325675502u, 3652676161u, |
11402 | 3120716054u, 3330259752u, |
11403 | 1011990087u, 2990167340u, |
11404 | 1097584090u, 3262252593u, |
11405 | 1829409951u, 3665087267u, |
11406 | 1214854475u, 2134299399u, |
11407 | 3704419305u, 411263051u, |
11408 | 1625446136u, 549838529u, |
11409 | 4283196353u, 1342880802u, |
11410 | 3460621305u, 1967599860u, |
11411 | 4282843369u, 1275671016u, |
11412 | 2544665755u, 853593042u, |
11413 | 901109753u, 2682611693u, |
11414 | 110631633u, 797487791u, |
11415 | 1472073141u, 850464484u, |
11416 | 797089608u, 3286110054u, |
11417 | 350397471u, 2775631060u, |
11418 | 366448238u, 3842907484u, |
11419 | 2219863904u, 3623364733u, |
11420 | 1850985302u, 4009616991u, |
11421 | 294963924u, 3693536939u, |
11422 | 3061255808u, 1615375832u, |
11423 | 1920066675u, 4113028420u, |
11424 | 4032223840u, 2318423400u, |
11425 | 2701956286u, 4145497671u, |
11426 | 3991532344u, 2536338351u, |
11427 | 1679099863u, 1728968857u, |
11428 | 449740816u, 2686506989u, |
11429 | 685242457u, 97590863u, |
11430 | 3258354115u, 1502282913u, |
11431 | 1235084019u, 2151665147u, |
11432 | 528459289u, 231097464u, |
11433 | 2477280726u, 3651607391u, |
11434 | 2091754612u, 1178454681u, |
11435 | 980597335u, 1604483865u, |
11436 | 1842333726u, 4146839064u, |
11437 | 3213794286u, 2601416506u, |
11438 | 754220096u, 3571436033u, |
11439 | 488595746u, 1448097974u, |
11440 | 4004834921u, 238887261u, |
11441 | 3320337489u, 1416989070u, |
11442 | 2928916831u, 4093725287u, |
11443 | 186020771u, 2367569534u, |
11444 | 3046087671u, 4090084518u, |
11445 | 3548184546u, 679517009u, |
11446 | 1962659444u, 3539886328u, |
11447 | 4192003933u, 1678423485u, |
11448 | 3827951761u, 3086277222u, |
11449 | 2144472852u, 1390394371u, |
11450 | 2976322029u, 1574517163u, |
11451 | 3553313841u, 119173722u, |
11452 | 1702434637u, 1766260771u, |
11453 | 3629581771u, 1407497759u, |
11454 | 895654784u, 751439914u, |
11455 | 4008409498u, 215917713u, |
11456 | 1482103833u, 695551833u, |
11457 | 1288382231u, 2656990891u, |
11458 | 2581779077u, 1570750352u, |
11459 | 3710689053u, 1741390464u, |
11460 | 2666411616u, 3533987737u, |
11461 | 4289478316u, 3576119563u, |
11462 | 4118694920u, 108199666u, |
11463 | 3869794273u, 963183826u, |
11464 | 2081410737u, 3796810515u, |
11465 | 791123882u, 2525792704u, |
11466 | 1036883117u, 136547246u, |
11467 | 875691100u, 2592925324u, |
11468 | 614302599u, 3013176417u, |
11469 | 2689342539u, 427154472u, |
11470 | 532957601u, 1228758574u, |
11471 | 1898117151u, 1181643858u, |
11472 | 1908591042u, 1464255968u, |
11473 | 446980910u, 2984611177u, |
11474 | 58509511u, 1046943619u, |
11475 | 3508927906u, 2001585786u, |
11476 | 2544767379u, 1525438381u, |
11477 | 552181222u, 1959725830u, |
11478 | 879448844u, 1348536411u, |
11479 | 4242243590u, 2861338018u, |
11480 | 1082052441u, 1034351453u, |
11481 | 601175800u, 764077711u, |
11482 | 530635011u, 3785343245u, |
11483 | 2178026726u, 117256687u, |
11484 | 2378297261u, 457568934u, |
11485 | 76438221u, 4104954272u, |
11486 | 956793873u, 3783168634u, |
11487 | 2485968477u, 2381948487u, |
11488 | 4226929450u, 3148473363u, |
11489 | 2518273601u, 3569490233u, |
11490 | 879369091u, 2180270337u, |
11491 | 3674375989u, 1387729170u, |
11492 | 977997984u, 4270646856u, |
11493 | 568650985u, 951677556u, |
11494 | 4213877384u, 2721005055u, |
11495 | 1073364549u, 2563403831u, |
11496 | 1678669911u, 66786703u, |
11497 | 2273631661u, 1149351924u, |
11498 | 3651298990u, 1581883443u, |
11499 | 246723096u, 1895026827u, |
11500 | 3810605772u, 3711056516u, |
11501 | 4058833288u, 2193790614u, |
11502 | 2080120290u, 3638638708u, |
11503 | 2915672708u, 2263003308u, |
11504 | 2361934197u, 4136767460u, |
11505 | 1976115991u, 3448840877u, |
11506 | 2019238520u, 225333538u, |
11507 | 874340815u, 2976159827u, |
11508 | 1555273378u, 3797521928u, |
11509 | 1942347150u, 3262952567u, |
11510 | 435997738u, 340403353u, |
11511 | 2817830907u, 2078619498u, |
11512 | 749534111u, 1178073973u, |
11513 | 894654712u, 3361226032u, |
11514 | 841092198u, 3288261538u, |
11515 | 1696412169u, 1496966875u, |
11516 | 697501571u, 1059158875u, |
11517 | 3739946319u, 2481012988u, |
11518 | 568983526u, 114945840u, |
11519 | 1559249010u, 2218244008u, |
11520 | 2841706923u, 1632780103u, |
11521 | 4020169654u, 2087949619u, |
11522 | 2438736103u, 24032648u, |
11523 | 833416317u, 3787017905u, |
11524 | 2373238993u, 2575395164u, |
11525 | 3434544481u, 3228481067u, |
11526 | 2542976862u, 2971726178u, |
11527 | 2880371864u, 3642087909u, |
11528 | 2407477975u, 2239080836u, |
11529 | 1043714217u, 3894199764u, |
11530 | 2235879182u, 203853421u, |
11531 | 2933669448u, 2504940536u, |
11532 | 834683330u, 425935223u, |
11533 | 3560796393u, 3565833278u, |
11534 | 1668000829u, 3683399154u, |
11535 | 3414330886u, 1748785729u, |
11536 | 1023171602u, 580966986u, |
11537 | 2531038985u, 3227325488u, |
11538 | 2657385925u, 2124704694u, |
11539 | 233442446u, 1107045577u, |
11540 | 3407293834u, 552770757u, |
11541 | 3899097693u, 1067532701u, |
11542 | 115667924u, 1406028344u, |
11543 | 1707768231u, 3724015962u, |
11544 | 2419657149u, 18613994u, |
11545 | 2532882091u, 3476683808u, |
11546 | 1560838678u, 811220224u, |
11547 | 895961699u, 3762914298u, |
11548 | 1328752423u, 1844996900u, |
11549 | 1420427894u, 1848067707u, |
11550 | 1210281744u, 904215228u, |
11551 | 4055325594u, 1118521573u, |
11552 | 2496554183u, 2579259919u, |
11553 | 3996647489u, 3657647605u, |
11554 | 325254059u, 3136157065u, |
11555 | 3951522674u, 4052925250u, |
11556 | 3341068436u, 2287683323u, |
11557 | 1313073005u, 126005630u, |
11558 | 2505120084u, 1194725057u, |
11559 | 853746559u, 3555092974u, |
11560 | 2689238752u, 49515858u, |
11561 | 1244776042u, 1069300695u, |
11562 | 61073168u, 1010661841u, |
11563 | 1269521335u, 1902040126u, |
11564 | 990632502u, 2378708922u, |
11565 | 3858321250u, 1400735275u, |
11566 | 2974699176u, 2771676666u, |
11567 | 170995186u, 2877798589u, |
11568 | 545726212u, 2225229957u, |
11569 | 1086473152u, 3454177594u, |
11570 | 3859483262u, 1499729584u, |
11571 | 2088002891u, 2883475137u, |
11572 | 3222194252u, 4144472319u, |
11573 | 2212229854u, 4146740722u, |
11574 | 567988835u, 1051332394u, |
11575 | 3932046135u, 542648229u, |
11576 | 3017852446u, 1277887997u, |
11577 | 162888005u, 1669710469u, |
11578 | 1492500905u, 553041029u, |
11579 | 1434876932u, 533989516u, |
11580 | 3817492747u, 584127807u, |
11581 | 4147115982u, 2993670925u, |
11582 | 4020312558u, 710021255u, |
11583 | 3509733475u, 3587959456u, |
11584 | 2088550465u, 1745399498u, |
11585 | 2952242967u, 1259815443u, |
11586 | 869648362u, 1404723176u, |
11587 | 3947542735u, 1334333531u, |
11588 | 3873471582u, 229399758u, |
11589 | 59634866u, 3239516985u, |
11590 | 3844250972u, 1275954779u, |
11591 | 1385684948u, 2243700741u, |
11592 | 2512155003u, 1685649437u, |
11593 | 639306006u, 2524620206u, |
11594 | 955360345u, 1646776457u, |
11595 | 576786501u, 655707039u, |
11596 | 2864351838u, 3736264674u, |
11597 | 655621239u, 362070173u, |
11598 | 1200907897u, 2384379464u, |
11599 | 15823708u, 206117476u, |
11600 | 3652870937u, 122927134u, |
11601 | 1193310960u, 1093099415u, |
11602 | 3696538026u, 4112584792u, |
11603 | 1834541277u, 845639252u, |
11604 | 2069527017u, 547588820u, |
11605 | 4178147211u, 2827259351u, |
11606 | 1764455305u, 3312003602u, |
11607 | 940846775u, 1054995047u, |
11608 | 2976960697u, 1934305529u, |
11609 | 3095615046u, 3354962706u, |
11610 | 2199137382u, 1005722394u, |
11611 | 1875867180u, 2064356511u, |
11612 | 3363633633u, 2688499147u, |
11613 | 4019734130u, 3096333006u, |
11614 | 2069509024u, 2906358341u, |
11615 | 3247463123u, 4191788132u, |
11616 | 2232866485u, 1456016086u, |
11617 | 1422674894u, 867282151u, |
11618 | 1851386407u, 1268304058u, |
11619 | 1612503136u, 1739843072u, |
11620 | 134947567u, 2978775774u, |
11621 | 2051592101u, 1017127033u, |
11622 | 1284167756u, 1090844589u, |
11623 | 831688783u, 2079216362u, |
11624 | 2079309682u, 1950585801u, |
11625 | 1626991196u, 3644714163u, |
11626 | 3678110059u, 898470030u, |
11627 | 1117570988u, 2517572125u, |
11628 | 3916646913u, 3182422972u, |
11629 | 3630426828u, 969847973u, |
11630 | 2835126238u, 53541366u, |
11631 | 3427164640u, 3463937250u, |
11632 | 3044785046u, 897322257u, |
11633 | 103038235u, 3804506837u, |
11634 | 3443872170u, 4185408854u, |
11635 | 2557463241u, 4080940424u, |
11636 | 3669923099u, 2789619871u, |
11637 | 2048168570u, 2429169982u, |
11638 | 3174690447u, 2513494106u, |
11639 | 3099587829u, 2627855577u, |
11640 | 1213061732u, 3143736628u, |
11641 | 3482268149u, 1250714337u, |
11642 | 3553412672u, 2689632914u, |
11643 | 31648125u, 3872383625u, |
11644 | 1565760579u, 36665130u, |
11645 | 1282106920u, 359361724u, |
11646 | 751041229u, 2257179590u, |
11647 | 2915361862u, 280819225u, |
11648 | 954406473u, 4101682199u, |
11649 | 2907818413u, 4254297769u, |
11650 | 3493178615u, 3755944354u, |
11651 | 3539557658u, 3330196096u, |
11652 | 4043533423u, 1134196225u, |
11653 | 4177134659u, 127246419u, |
11654 | 4213770762u, 1978302978u, |
11655 | 2442615581u, 923049607u, |
11656 | 1004426206u, 782768297u, |
11657 | 2702745496u, 1880389457u, |
11658 | 2410586681u, 1430106871u, |
11659 | 4103323427u, 3168399477u, |
11660 | 201787012u, 3105353527u, |
11661 | 3716682375u, 3616334719u, |
11662 | 3413209549u, 656672786u, |
11663 | 526032790u, 2895072131u, |
11664 | 2876965944u, 182894450u, |
11665 | 456581318u, 2683752067u, |
11666 | 1287916294u, 1270745752u, |
11667 | 3877875910u, 3190666241u, |
11668 | 3240336907u, 4024807233u, |
11669 | 4227999465u, 2389301430u, |
11670 | 1681224377u, 1576191191u, |
11671 | 3599250276u, 2381111980u, |
11672 | 3995044500u, 995595530u, |
11673 | 3495321877u, 3956024585u, |
11674 | 1611608524u, 3815677453u, |
11675 | 1520987487u, 3669102590u, |
11676 | 2062334396u, 1656117707u, |
11677 | 5457134u, 3234118251u, |
11678 | 4242065111u, 596879987u, |
11679 | 470187419u, 2688566989u, |
11680 | 3259870297u, 660100446u, |
11681 | 1042378442u, 2206034096u, |
11682 | 442236198u, 2542452448u, |
11683 | 493137955u, 392411099u, |
11684 | 3111186954u, 438250493u, |
11685 | 947967568u, 1234595917u, |
11686 | 4230082284u, 2762976773u, |
11687 | 421203727u, 3728409592u, |
11688 | 2870085764u, 1455086530u, |
11689 | 2762099647u, 4011882747u, |
11690 | 1785430706u, 3684427488u, |
11691 | 1215981925u, 3227517889u, |
11692 | 3269061963u, 4037515364u, |
11693 | 1749401388u, 2167451566u, |
11694 | 3168911474u, 4255057396u, |
11695 | 2026092260u, 1736192508u, |
11696 | 4123254745u, 2319366806u, |
11697 | 3909727042u, 3114708966u, |
11698 | 1938800693u, 680793595u, |
11699 | 3933041672u, 616863613u, |
11700 | 1525265867u, 2808224480u, |
11701 | 2122290603u, 1211197714u, |
11702 | 1186177814u, 2395325006u, |
11703 | 3520488321u, 3979192396u, |
11704 | 3540779343u, 4192918639u, |
11705 | 1763872074u, 3402419930u, |
11706 | 2736030448u, 1120335563u, |
11707 | 1698949078u, 3993310631u, |
11708 | 2947659998u, 1461045789u, |
11709 | 1966048551u, 2228221363u, |
11710 | 597941119u, 3498018399u, |
11711 | 1441110751u, 2229999711u, |
11712 | 393987327u, 454500547u, |
11713 | 1222959566u, 567151340u, |
11714 | 2496952483u, 1708770195u, |
11715 | 3774764786u, 1492844524u, |
11716 | 3308300614u, 805568076u, |
11717 | 4068812294u, 3404648243u, |
11718 | 868414882u, 177406999u, |
11719 | 1608110313u, 642061169u, |
11720 | 2093999089u, 222470301u, |
11721 | 1027515771u, 3131251981u, |
11722 | 2851936150u, 4272755262u, |
11723 | 2763002551u, 1881527822u, |
11724 | 1532845092u, 709643652u, |
11725 | 682573592u, 1244104217u, |
11726 | 440905170u, 1111321746u, |
11727 | 796769556u, 2500467040u, |
11728 | 3002618826u, 1112998535u, |
11729 | 1188525643u, 4212674512u, |
11730 | 1780193104u, 1243644607u, |
11731 | 3691719535u, 2958853053u, |
11732 | 2813437721u, 4036584207u, |
11733 | 466635014u, 2277292580u, |
11734 | 4082276003u, 1030800045u, |
11735 | 1899531424u, 609466946u, |
11736 | 1750863246u, 379050598u, |
11737 | 3576413281u, 731493104u, |
11738 | 2707384133u, 2289193651u, |
11739 | 132259176u, 4115195437u, |
11740 | 1769890695u, 2715470335u, |
11741 | 3348954692u, 2166575624u, |
11742 | 1819263183u, 2028531518u, |
11743 | 2154809766u, 3672399742u, |
11744 | 1142139448u, 88299682u, |
11745 | 76727603u, 4198182186u, |
11746 | 2304993586u, 1666387627u, |
11747 | 2488475423u, 3832777692u, |
11748 | 284366017u, 3359785538u, |
11749 | 3469807328u, 2926494787u, |
11750 | 1914195188u, 1134129972u, |
11751 | 3829072836u, 2493478921u, |
11752 | 3738499303u, 3311304980u, |
11753 | 726951526u, 911080963u, |
11754 | 932916545u, 2235559063u, |
11755 | 2909742396u, 1765719309u, |
11756 | 465269850u, 3803621553u, |
11757 | 1456588655u, 508290328u, |
11758 | 1490719640u, 3356513470u, |
11759 | 2262196163u, 1451774941u, |
11760 | 2908490783u, 251085588u, |
11761 | 830410677u, 3172220325u, |
11762 | 4039692645u, 1383603170u, |
11763 | 3897208579u, 1940535730u, |
11764 | 151909546u, 2384458112u, |
11765 | }; |
11766 | |
11767 | // Return false only if offset is -1 and a spot check of 3 hashes all yield 0. |
11768 | bool Test(int offset, int len = 0) { |
11769 | #undef Check |
11770 | #undef IsAlive |
11771 | |
11772 | #define Check(x) do { \ |
11773 | const uint32_t actual = (x), e = expected[index++]; \ |
11774 | bool ok = actual == e; \ |
11775 | if (!ok) { \ |
11776 | cerr << "expected " << hex << e << " but got " << actual << endl; \ |
11777 | ++errors; \ |
11778 | } \ |
11779 | assert(ok); \ |
11780 | } while (0) |
11781 | |
11782 | #define IsAlive(x) do { alive += IsNonZero(x); } while (0) |
11783 | |
11784 | // After the following line is where the uses of "Check" and such will go. |
11785 | static int index = 0; |
11786 | if (offset == -1) { int alive = 0; { uint64_t h = farmhashxo::Hash64WithSeeds(data, len++, SEED0, SEED1); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashxo::Hash64WithSeed(data, len++, SEED); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } { uint64_t h = farmhashxo::Hash64(data, len++); IsAlive(h >> 32); IsAlive((h << 32) >> 32); } len -= 3; return alive > 0; } |
11787 | { uint64_t h = farmhashxo::Hash64WithSeeds(data + offset, len, SEED0, SEED1); Check(h >> 32); Check((h << 32) >> 32); } |
11788 | { uint64_t h = farmhashxo::Hash64WithSeed(data + offset, len, SEED); Check(h >> 32); Check((h << 32) >> 32); } |
11789 | { uint64_t h = farmhashxo::Hash64(data + offset, len); Check(h >> 32); Check((h << 32) >> 32); } |
11790 | |
11791 | return true; |
11792 | #undef Check |
11793 | #undef IsAlive |
11794 | } |
11795 | |
11796 | int RunTest() { |
11797 | Setup(); |
11798 | int i = 0; |
11799 | cout << "Running farmhashxoTest" ; |
11800 | if (!Test(-1)) { |
11801 | cout << "... Unavailable\n" ; |
11802 | return NoteErrors(); |
11803 | } |
11804 | // Good. The function is attempting to hash, so run the full test. |
11805 | int errors_prior_to_test = errors; |
11806 | for ( ; i < kTestSize - 1; i++) { |
11807 | Test(i * i, i); |
11808 | } |
11809 | for ( ; i < kDataSize; i += i / 7) { |
11810 | Test(0, i); |
11811 | } |
11812 | Test(0, kDataSize); |
11813 | cout << (errors == errors_prior_to_test ? "... OK\n" : "... Failed\n" ); |
11814 | return NoteErrors(); |
11815 | } |
11816 | |
11817 | #else |
11818 | |
11819 | // After the following line is where the code to print hash codes will go. |
11820 | void Dump(int offset, int len) { |
11821 | { uint64_t h = farmhashxo::Hash64WithSeeds(data + offset, len, SEED0, SEED1); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
11822 | { uint64_t h = farmhashxo::Hash64WithSeed(data + offset, len, SEED); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
11823 | { uint64_t h = farmhashxo::Hash64(data + offset, len); cout << (h >> 32) << "u, " << ((h << 32) >> 32) << "u," << endl; } |
11824 | } |
11825 | |
11826 | #endif |
11827 | |
11828 | #undef SEED |
11829 | #undef SEED1 |
11830 | #undef SEED0 |
11831 | |
11832 | } // namespace farmhashxoTest |
11833 | |
11834 | #if TESTING |
11835 | |
11836 | static int farmhashxoTestResult = farmhashxoTest::RunTest(); |
11837 | |
11838 | #else |
11839 | int main(int argc, char** argv) { |
11840 | Setup(); |
11841 | cout << "uint32_t expected[] = {\n" ; |
11842 | int i = 0; |
11843 | for ( ; i < kTestSize - 1; i++) { |
11844 | farmhashxoTest::Dump(i * i, i); |
11845 | } |
11846 | for ( ; i < kDataSize; i += i / 7) { |
11847 | farmhashxoTest::Dump(0, i); |
11848 | } |
11849 | farmhashxoTest::Dump(0, kDataSize); |
11850 | cout << "};\n" ; |
11851 | } |
11852 | #endif |
11853 | |
11854 | #endif // FARMHASHSELFTEST |
11855 | |