The SIMD header defines the lxsimd namespace containing special types and functions for doing SIMD (Single Instruction, Multiple Data) operations. The deformation API in particular is designed for SIMD code.
- Farray -- an array of floats, each a different value of the same parameter.
- Varray -- an array of 3 Farrays holding vectors.
- Constant and buffer versions of these two.
The Farray and Varray functions take arrays and a length, and perform a math operation over the entire array. Obviously in-line SIMD operations would be faster, but it can be a black art coaxing the compiler to vectorize any given loop. These functions are guaranteed to be vectorized, and will be 3-4x faster than individual operations.