public static unsafe void Unshuffle(int bytesOfType, Span <byte> source, Span <byte> destination) { fixed(byte *src = source, dest = destination) { ShuffleAvx2.unshuffle_avx2(bytesOfType, source.Length, src, dest); } }
public static unsafe void Unshuffle(int bytesOfType, Span <byte> source, Span <byte> destination) { #if NETCOREAPP3_0 if (Avx2.IsSupported) { ShuffleAvx2.Unshuffle(bytesOfType, source, destination); } else if (Sse2.IsSupported) { ShuffleSse2.Unshuffle(bytesOfType, source, destination); } else #endif ShuffleGeneric.Unshuffle(bytesOfType, source, destination); }