3 ms·
I don't understand how #1 is possible. How do you statically compile the code once & have it automatically choose the right vector width that's available on the
by vlovich123 6y ago
I don't understand how #1 is possible. How do you statically compile the code once & have it automatically choose the right vector width that's available on the CPU at run time? Does the compiler just emit an instruction saying "ideal width at this point is 256bits" & the CPU will automatically optimize that however needed?
I've been unable to find any meaningful description of how this actually works.
- jedbrown 6y agoAn example showing how one writes vector-length agnostic code using C intrinsics, and the assembly that is produced: https://developer.arm.com/documentation/100891/0612/coding-considerations/using-sve-intrinsics-directly-in-your-c-code https://developer.arm.com/documentation/100891/0612/coding-c...
- vlovich123 6y agoCould just be me, but that seems mind-bogglingly complex vs regular vector instructions & could easily make some traditional programs even harder to vectorize.