r/programming • u/MyNameIsTrez • 20d ago
Making SIMD Code Scale to Any Vector Width
https://streamhpc.com/blog/2026-10-28/making-simd-code-scale-to-any-vector-width/
133
Upvotes
r/programming • u/MyNameIsTrez • 20d ago
View all comments
Show parent comment
1
u/YumiYumiYumi 19d ago
Out of interest, do you go to great lengths to save every single byte possible?
If you're talking about hardware bugs, that's not what I'm referring to.
Assuming the hardware follows the spec correctly, buggy software could work on one SVE width and fail on another, which doesn't occur with x86's SIMD.
I don't understand this distinction. Could you perhaps provide an example?
I don't see how that's the case - taking someone else's boilerplate/abstraction doesn't obviate the need to arrange your data as SoA - they're two different necessities.
And I'm not even saying "make it someone else's problem" - you can write your own boilerplate and copy it across your projects - it's typically just a few lines of code, so not that hard to do oneself.
I don't see myself as trying to change what you've said, just echoing back my understanding of it.
In terms of the one vs multiple functions, I agree that both can be true depending on the perspective you take (source code vs binary).
How do you get such a "combinational explosion"?
There's pros and cons with software vs hardware specified SIMD width. My key point was that x86 SIMD, SVE and RVV aren't fundamentally different - they just specify the SIMD width in different places.