Does anyone know why 's nightly SIMD module uses a separate data structure from an ordinary array?
doc.rust-lang.org/nightly/std/si
I'm sure they considered that, just wondering what the pros/cons involved were!
Conversation
Could it have something to do with how it might be allocated in the appropriate SIMD registers?
1
2
Noting the `#[repr(simd)]` on the struct declaration, for instance.
yes, hello!
twitter.com/0xPCK/status/1
Correct, arrays are not actually interchangeable in ABI terms with SIMD values, even though they are often very close.
1
4
We actually had to change the internal permissible types for repr(simd) just to get arrays to work. Previously they were only tuples, but homogenous values. We had to do surprisingly extensive research just to confirm arrays would work.
2
2
Show replies



