Open
Conversation
Contributor
AntoinePrv
commented
Apr 3, 2026
- Add cpu_feature test
- Add run CPU tests in CI
| run: cmake --build _build | ||
| - name: Set CPU feature test expectations | ||
| run: | | ||
| echo "XSIMD_TEST_CPU_ASSUME_SSE4_2=0" >> "$GITHUB_ENV" |
Contributor
There was a problem hiding this comment.
wouldn't that be easy to just not set it instead of setting it to zero?
Contributor
Author
There was a problem hiding this comment.
Here we have two cases:
- not defined (the default): Do not run the tests. This is important so that the test runs properly locally without failing.
- Define to zero: Explicitly check the absence of a feature. This is important so that we do not detect a higher architecture at runtime than is available and crash the program.
| xsimd::x86_cpu_features cpu; | ||
|
|
||
| // SSE implication chain | ||
| CHECK_IMPLICATION(cpu.sse4_2(), cpu.sse4_1()); |
Contributor
There was a problem hiding this comment.
Would that make sense to use this to also check the is_base_of type relationship?
Contributor
Author
There was a problem hiding this comment.
What do you have in mind, could you provide an example?
This file contains hidden or 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
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.