There's also a big discussion to be had about how the Rust language might more natively support SIMD. There are some hacks in fearless_simd to work around limitations in the language (especially relying on inlining as load-bearing), and it would be excellent to make that more robust. But the best path forward is not obvious.
struct { float x, y, x } arr[100]
which is easier to grok and maintain, but the internal memory layout transparently becomes more like struct { x[100], y[100], x[100] } arr
See https://ispc.github.io/ispc.html#structure-of-array-types.When such semantics are provided by the language itself, the need to resort to explicit SIMD intrinsics (directly or indirectly via API abstractions) is tremendously reduced as most of the biggest impediments to auto-vectorization are lifted. ISPC also provides complementing language features for managing parallel control flow, e.g. conditional masking, that significantly obviates much of the remaining use cases for explicit SIMD procedures.
tmaly•5mo ago