Commit Graph

975 Commits

Author SHA1 Message Date
Yann Collet
ad86c7ca1e added XXH3_128bits_update_dispatch() 2020-06-10 12:16:32 -07:00
Yann Collet
21a9a8c995 added XXH3_64bits_update_dispatch 2020-06-10 12:12:24 -07:00
Yann Collet
7c8b6995ff simplified seed allocation
to be compatible with any vector mode selected by dispatch.
2020-06-10 11:36:58 -07:00
Yann Collet
df5aca4f85 shortened source code for small inputs 2020-06-10 10:51:33 -07:00
Yann Collet
35fad7a3de shortened a few names
handle unused function warning
2020-06-09 21:15:50 -07:00
Yann Collet
710661b6ea replaced function pointers by a table
simplify dispatch logic
2020-06-09 17:14:02 -07:00
Yann Collet
f629e4a7f0 added XXH3_64bits_withSecret_dispatch() 2020-06-09 16:32:01 -07:00
Yann Collet
a80dac4426 added sse2 target 2020-06-09 14:41:51 -07:00
Yann Collet
0e87760b03 fix compilation strategy
starting from "baseline",
adding support for additional vector instructions selectively
2020-06-09 14:10:13 -07:00
Yann Collet
16f728f058 first dispatcher concept
replace 2 functions : XXH3_64bits() and XXH3_64bits_withSeed()
new target : make dispatch
compiled with -mavx2 by default

compiles fine with -mavx512f, but then crash at runtime detection
2020-06-08 23:15:08 -07:00
Yann Collet
16890b5c01
Merge pull request #385 from Cyan4973/aarch64_unaligned
remove alignment check on aarch64
2020-06-04 18:59:29 -07:00
Yann Collet
37a68f29df remove alignment check on aarch64
as this architecture offers decent performance for unaligned memory accesses (like x86/x64).

This circumvent the problem described in #383,
as the direct read path using `const xxh_u32*` will not be generated by default.

Note however that this does not go at the root of the problem,
which is a possibility of strict-aliasing issue
when using the direct read path _and_ inlining xxh32.
This issue however is more difficult to solve without a reproduction case.

I also used this opportunity to fix or reinforce documentation.
2020-06-04 00:05:24 -07:00
Yann Collet
1d2811fc17
Merge pull request #381 from WayneD/dev
Make xxhsum check if fread() failed
2020-05-29 13:50:43 -07:00
Yann Collet
2a80fa27a0
Merge pull request #379 from Cyan4973/fix378
fix streaming checksum
2020-05-29 13:16:09 -07:00
Wayne Davison
082399bfe8 Make xxhsum check if fread() failed
If fread() fails reading a file, output an error and exit.  The new code
also avoids an update call on a 0-length buffer at end of file.
2020-05-29 12:59:27 -07:00
Yann Collet
226d3ffd88 fixed constant 2020-05-29 11:30:52 -07:00
Yann Collet
753119ebe0 generalized random ingestion pattern test 2020-05-29 10:49:51 -07:00
Yann Collet
2934bd02b6
Merge pull request #377 from Cyan4973/initCustomSecret
Vectorized initCustomSecret()
2020-05-28 21:34:35 -07:00
Yann Collet
be37c619bf added aarch64 + clang tests
fixed the const property for the asm hack to work
2020-05-28 18:01:11 -07:00
Yann Collet
d2a00cdabb fixed variable shadowing 2020-05-28 16:30:26 -07:00
Yann Collet
ff07228149 fix streaming checksum
Streaming implementation of XXH3/XXH128 could fail, reporting an incorrect hash value,
for certain specific ranges of length, and providing input in segments of random length.
issue reported by @WayneD
fix #378
updated test case to catch this issue
2020-05-28 16:10:00 -07:00
Yann Collet
0ce6bc0f4a conflict fixes and minor code style changes
added avx512 CI tests
2020-05-27 20:35:07 -07:00
Yann Collet
0bced63140
vectorize XXH3_initCustomSecret (#376)
* vectorize initCustomSecret method

* revert Makefile

* pass compiling

* revert Makefile

* fix unused function warning

* do not use brace initialization for sse types

* workaround for msvc 32bit mode before vs 2013U2

* workaround before MSVC 2015

* use portable way for sse2

* Revert "use portable way for sse2"

This reverts commit 34eee07a7071ab963bd5a48e3960f40b28e209c2.

* use _mm_load_si128 for MSVC x86

* try to minimize align of custom secret

* for avx2 and sse2, optmize the prolog of XXH3_hashLong_xb_withSeed

Co-authored-by: James Z.M. Gao <gaozhiming@360.cn>
2020-05-27 18:44:06 -07:00
Yann Collet
ceed8a7153
simplified XXH_PREFETCH_DIST logic (#375)
still distinguishes :
- __clang__ : 320
- AVX512 : 512
- the rest : 384
2020-05-27 15:00:40 -07:00
Witold Baryluk
43deef25ce
Remove "Loading..." from source (#373)
* Remove --quiet and "Loading ..." from manpage

* Remove "Loading ..." from markdown manpage

* Removing "Loading..." from code

* Update tests for "Loading..."

* Remove the remaining "Loading..." from source

Forgot about this one

* Test error message on non-existing file

* Fix a typo in a test (xxhsum vs ./xxhsum)

* Fix a typo for real. noneexistent -> nonexistent

Tested.
2020-05-27 11:43:41 -07:00
Yann Collet
d697d7176b
Merge pull request #369 from Cyan4973/hugeSecret
support for secretSize > 4 GB in streaming mode
2020-05-20 23:43:16 -07:00
Yann Collet
e3ad2c907f support for secretSize > 4 GB in streaming mode
fix #368
2020-05-20 19:21:25 -07:00
Yann Collet
8c689cb878
Merge pull request #366 from Cyan4973/moveXXH3state
make XXH3_state_t movable
2020-05-20 18:47:04 -07:00
Yann Collet
6af67b92b7 Merge branch 'dev' into moveXXH3state 2020-05-20 14:31:11 -07:00
Yann Collet
d82f0c86d1
Merge pull request #367 from easyaspi314/clean_namespace
Clean up namespace
2020-05-20 14:25:48 -07:00
easyaspi314 (Devin)
9405c1ca88 Fix PPC compile errors 2020-05-20 16:49:36 -04:00
easyaspi314 (Devin)
da20cf1156 Fix minor formatting issue 2020-05-20 16:41:53 -04:00
easyaspi314 (Devin)
3eb1a010a0 Clean up namespace
- Every symbol, typedef, and macro is prefixed with XXH or xxh.
 - For compatibility with legacy code that messes with the internals,
   XXH_OLD_NAMES can be defined to wrap the old names in macros. This
   also brings back U32 and friends.
2020-05-20 16:36:24 -04:00
Yann Collet
deeae7f5fd fixed minor conversion warning 2020-05-20 13:05:34 -07:00
Yann Collet
a97e8a88a2 make XXH3_state_t movable
also fix XXH3_copyState()
when copying a state initialized with a seed.

fix #365
2020-05-20 10:45:27 -07:00
Yann Collet
d8bed9a54d
Merge pull request #363 from vrqq/patch-1
Fix issue 362
2020-05-16 01:20:29 -07:00
vrqq
90e5f76687
Fix issue 362
Fixed: https://github.com/Cyan4973/xxHash/issues/362#issue-619394966
2020-05-16 15:43:29 +08:00
Yann Collet
d45288407e
Merge pull request #360 from weaversa/dev
Contribute a Cryptol specification of XXH32 and XXH64 to the documentation
2020-05-09 10:01:03 -07:00
Sean Weaver
f74ee47f93 Contribute a Cryptol specification of XXH32 and XXH64 to the documentation 2020-05-09 12:40:34 -04:00
Yann Collet
dda230e4dd
Merge pull request #349 from Cyan4973/betterHelp
Improved help message
2020-04-08 15:38:30 -07:00
Yann Collet
29ff35da80 Improved help message
following suggestions from #345.

Note : only cosmetic changes in this diff,
I've avoided any change that would impact the behavior of the program.
2020-04-07 15:19:08 -07:00
Yann Collet
fa1368ad7a
Merge pull request #346 from easyaspi314/unicode_fix_3
Fix Unicode hopefully for the last time
2020-04-07 14:18:10 -07:00
Yann Collet
294c403110
Merge pull request #347 from gzm55/work/avx512
add optimized implementation for AVX512 targets
2020-04-07 13:41:52 -07:00
James Z.M. Gao
fbd6bb1414 update avx512 prefetch distance for gcc and clang 2020-04-08 01:36:18 +08:00
James Z.M. Gao
301727fe33 fix ident format 2020-04-06 18:06:33 +08:00
James Z.M. Gao
4b12376862 add optimized implementation for AVX512 targets 2020-04-06 15:58:26 +08:00
easyaspi314 (Devin)
ab2862f867 Fix Unicode hopefully for the last time
Use `__wgetmainargs()` instead of `GetCommandLineW()` and
`CommandLineToArgvW()`. While it is an internal API, aside from
declaring the function, it actually simplifies things a lot, as we can
setup a `wmain()` equivalent in a few lines.

It also avoids linking to `Shell32.dll`, which is a lot of bloat for a
simple command line utility.

Most importantly, this supports wildcards on `cmd.exe`, fixing #341.

Also improved comments and did minor cleanup.
2020-03-28 15:40:51 -04:00
Yann Collet
7fc2b54047
Merge pull request #337 from easyaspi314/arm-speed-hax
[ARM/Clang] Minor speed hacks
2020-03-16 17:31:00 -07:00
Yann Collet
3e6c039a87
Merge pull request #338 from easyaspi314/fix-warnings
Fix a few warnings
2020-03-16 10:18:49 -07:00
easyaspi314 (Devin)
7ea2940fd6 Fix a few warnings
- Trailing comma in enum in xxhsum.c
 - Extra semicolon
 - Non-constant brace list initializers
2020-03-16 12:29:49 -04:00