zlacker

[parent] [thread] 1 comments
1. cbm-vi+(OP)[view] [source] 2024-01-23 22:33:07
Even without a -ffast-math flag, the current stable Rust compiler will vectorize loops on integer types.

https://godbolt.org/z/KjErzacfv

Edit: ...and I now realize who I responded to, I'm sure you already know this. :)

replies(1): >>galang+6b
2. galang+6b[view] [source] 2024-01-23 23:42:37
>>cbm-vi+(OP)
Loops on floats are fine, its just reduction operations that hit the issue with the associativity assumption for floats leading to UB. You can trick it by making f32x16 types like the wide crate does or if you use nightly simba can do it with const generic expressions.
[go to top]