Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang-cl dispatch #865

Merged
merged 2 commits into from Jul 15, 2023
Merged

Fix clang-cl dispatch #865

merged 2 commits into from Jul 15, 2023

Conversation

t-mat
Copy link
Contributor

@t-mat t-mat commented Jul 15, 2023

This PR resolves #763 and #863 (partially).
Also enables to compile xxhsum with auto-vec (dispatch).

We can build it with the following commands

cd cmake_unofficial
mkdir build-clang-cl
cd build-clang-cl

cmake .. -DCMAKE_BUILD_TYPE=Release -DDISPATCH=ON -A x64 -DCMAKE_GENERATOR_TOOLSET=ClangCL
cmake --build . --config Release
.\Release\xxhsum.exe -bi1

It also supports standard XXH_DISPATCH_* configurations.

cmake .. -DXXHASH_C_FLAGS="-DXXH_DISPATCH_AVX2=0" -DCMAKE_BUILD_TYPE=Release -DDISPATCH=ON -A x64 -DCMAKE_GENERATOR_TOOLSET=ClangCL

clang-cl defines both __clang__ and _MSC_VER.

Also it seems clang-cl needs extra headers to compile AVX2/512F intrinsic.
- Actual platform name of x64 for MSVC/clang-cl is "AMD64"
- When we compile xxhsum with dispatch, we need xxh_x86dispatch.c
@Cyan4973 Cyan4973 merged commit 1a53004 into Cyan4973:dev Jul 15, 2023
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dispatch regression with recent commit
2 participants