Commit Graph

19 Commits

Author SHA1 Message Date
gingerBill
a5a7226885 Remove auto_cast 2023-01-16 12:09:09 +00:00
Jeroen van Rijn
b99940f33a [xxhash] For the streaming tests, randomly select the size to use.
Randomize size used with `update`.

It'll print "Using user-selected seed {18109872483301276539,2000259725719371} for update size randomness."

If a streaming test then fails, you can repeat it using:
`odin run . -define:RAND_STATE=18109872483301276539 -define:RAND_INC=2000259725719371`
2022-05-02 19:20:25 +02:00
Jeroen van Rijn
6985181961 [xxhash] Add tests for large inputs
Test XXH32, XXH64, XXH3-64 and XXH3-128 for large inputs, with both all-at-once and streaming APIs.

XXH32_create_state and XXH64_create_state now implicitly call their "reset state" variants to simplify the streaming API to 3 steps:
- create state / defer destroy
- update
- digest (finalize)

These are tested with an array of 1, 2, 4, 8 and 16 megabytes worth of zeroes.
All return the same hashes as do both the one-shot version, as well as that of the official xxhsum tool.

3778/3778 tests successful.
2022-05-02 17:51:39 +02:00
Jeroen van Rijn
335b724209 [xxh3] Fix flaws in streaming implementation 2022-05-01 12:47:05 +02:00
gingerBill
f0529535e0 ODIN_ENDIAN changed to an enum constant; ODIN_ENUM_STRING is the new string version of the old constant 2022-01-15 17:53:18 +00:00
gingerBill
b427bd8105 Correct XXH_DISABLE_PREFETCH usage 2021-09-18 12:59:54 +01:00
gingerBill
6855538729 Merge branch 'master' into llvm-12.0.1-windows 2021-09-18 12:55:13 +01:00
Jeroen van Rijn
b6d0a8fe0c xxhash: Add tests for streaming input. 2021-09-15 23:32:48 +02:00
Jeroen van Rijn
662d27b796 Finish xxHash implementation. 2021-09-15 20:06:07 +02:00
Jeroen van Rijn
a641ef95c0 Add XXH3-64 + tests. 2021-09-13 20:58:26 +02:00
Jeroen van Rijn
00c1d34108 xxhash: Extra (generated) tests. 2021-09-11 23:45:08 +02:00
gingerBill
7260d3cecb Add intrinsics.prefetch_* procedures 2021-09-11 17:30:44 +01:00
Jeroen van Rijn
5f920414d7 xxhash: Disable prefetch on Linux. 2021-09-11 15:45:17 +02:00
Jeroen van Rijn
72782d9035 xxhash: Fix test on Linux. 2021-09-11 15:39:11 +02:00
Jeroen van Rijn
eaefbc43cb xxhash: Add XXH3_128 + test vectors. 2021-09-11 15:28:49 +02:00
Jeroen van Rijn
f04614b1f1 Make -vet happy. 2021-09-09 16:05:59 +02:00
Jeroen van Rijn
637685316d Add xxhash tests to CI. 2021-09-09 16:01:44 +02:00
Jeroen van Rijn
f16e98b074 Add xxhash benchmark. 2021-09-09 15:26:57 +02:00
Jeroen van Rijn
f5d5417af7 xxhash: Initial implementations. 2021-09-09 15:26:57 +02:00