1. 16
    1. 2

      I’m sure the author already knows this, but you could accomplish the stated goal for the SIMD swizzle use case with a const fn:

      impl<const N: usize> Swizzle<N> for FetchEven<N> {
          const INDEX: [usize; N] = compute_FetchEven_INDEX();
      }
      

      Full playground with FetchEven and SwapPairs examples.