-
Notifications
You must be signed in to change notification settings - Fork 6
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
Architecture-specific dispatching #6
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7240c28
to
dd1d62f
Compare
dd1d62f
to
3c21db2
Compare
c1a9b8f
to
f0c36c5
Compare
CRC and qCheck are different compilation targets now. CRC32 is still header-only at the moment but this sets it up to have a more private implementation
Removes the template-based function generation.
Staticaly generates the CRC tables for each of the polynomials rather than generating them at run-time.
Use a function rather than a lambda. Use specific memory-ordering for atomic variables.
``` ... In Armv8-A, this is an OPTIONAL instruction, and in Armv8.1 it is mandatory for all implementations to implement it. ... ``` https://developer.arm.com/documentation/ddi0597/2020-12/Base-Instructions/CRC32--CRC32- Uses the `crc32{b,h,w,d}` and `crc32c{b,h,w,d}`instructions. Dispatch is determined at compile-time using the `__ARM_FEATURE_CRC32` preprocessor. Tested on an M2 Mac Mini, it's not all that faster, might be something I'm doing wrong? Before: ``` ./qCheck-generic -c 26.95s user 3.82s system 104% cpu 29.345 total ``` After: ``` ./qCheck-crc32 -c 26.85s user 3.69s system 104% cpu 29.204 total ```
Re-implements the x64 version of the carryless-multiply acceleration to fold 64 bytes of data at a time. Passes unit tests.
When multiplying the two high arguments together, `vmull_high_p64` can be used instead of extracting the lanes manually.
Let this be a user-provided variable since we can't always assume everyone has x64 and arm64 library files at the same time.
Fixes `std:max` compilation error
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements patterns and abstractions to dispatch architecture-specific accelerations.
This also adds an ARM64 accelerated CRC32 implementation