16 elements is enough for vectors with 32-bit elements, but not for smaller element types. Shuffles for those are not part of AVX-512 proper, but are included by further instruction set extensions. Besides, current hardware SIMD width should not dictate the design of vector types, nor should syntax be designed under the assumption that hardware won’t change in the future.
I do admit that dedicated syntax is quite convenient when you need to shuffle a vector, but for the above reasons it can’t be the only way to shuffle. If it’s even a good fit for Rust to begin with, which I’m not sure of.
This is true, but it points to an issue with wrapper types: The primitive type would be privileged, gaining special syntax that a newtype can’t emulate. If you wanted to add a method, or present a different/more expansive interface to SIMD, you’d need an ugly extension trait or client code would need to regularly take out the structural type, perform an operation (e.g., shuffle) with it, and then wrap it back up. Moreover, if you wanted to represent a vector with some invariant as newtype, you’d be out of luck.
So to encourage a strong ecosystem around SIMD computations, I believe our representation of shuffles should be expressible in library code to enable newtypes. Naturally, we don’t currently have the means to express a shuffle signature — but luckily, we don’t need fully generic shuffles right now, if we start with intrinsics. If, however, we start out with special syntax for shuffles, it becomes much harder to turn that into something that can be supported by libraries.