If x86 only, the predefined versions might do it - `version(D_AVX2)` for 512 bit vectors (`-mattr=+avx2`), and D_AVX for 256 bit. There aren't other alternatives at the moment AFAIK; a trait might be a nice addition.