Skip to content

Make xsimd_scalar.hpp independent from xsimd::batch#1178

Merged
serge-sans-paille merged 2 commits into
masterfrom
fix/remove-reference-to-batch-in-scalar
Oct 13, 2025
Merged

Make xsimd_scalar.hpp independent from xsimd::batch#1178
serge-sans-paille merged 2 commits into
masterfrom
fix/remove-reference-to-batch-in-scalar

Conversation

@serge-sans-paille
Copy link
Copy Markdown
Contributor

This paves the way for cleaner error when trying to instantiate an xsimd::batch when to architecture is available.

Related to #1143

This paves the way for cleaner error when trying to instantiate an
xsimd::batch when to architecture is available.

Related to #1143
@serge-sans-paille
Copy link
Copy Markdown
Contributor Author

@DiamonDinoia / @JohanMabille this patch changes the behavior when no arch is supported. Previous behavior was "lots of meaningless error". After the patch of this patchset, the error becomes a type error "xsimd::batch does not exist" and after the second patch of this patcheset, we have a proper static assert.
I'm satisified with that behavior but I'd be happy to read your opinion on this before merging.

@DiamonDinoia
Copy link
Copy Markdown
Contributor

Hi @serge-sans-paille I think this is a good idea.

Do you think my workaround #1143 (comment) is going to break due to the static_assert?

@serge-sans-paille
Copy link
Copy Markdown
Contributor Author

@DiamonDinoia given the include order and the change I've made, I don't think it will break: you'lle never end up with the fallback batch type

@serge-sans-paille serge-sans-paille merged commit e808799 into master Oct 13, 2025
118 checks passed
@JohanMabille JohanMabille deleted the fix/remove-reference-to-batch-in-scalar branch October 14, 2025 07:17
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.

3 participants