private static void Add(float a, Span <float> dst) { if (Sse.IsSupported) { SseIntrinsics.AddScalarU(a, dst); } else { for (int i = 0; i < dst.Length; i++) { dst[i] += a; } } }
public static void Add(float value, Span <float> destination) { Contracts.AssertNonEmpty(destination); if (Avx.IsSupported) { AvxIntrinsics.AddScalarU(value, destination); } else if (Sse.IsSupported) { SseIntrinsics.AddScalarU(value, destination); } else { for (int i = 0; i < destination.Length; i++) { destination[i] += value; } } }
public static void Add(float a, Span <float> dst) { Contracts.AssertNonEmpty(dst); if (Avx.IsSupported) { AvxIntrinsics.AddScalarU(a, dst); } else if (Sse.IsSupported) { SseIntrinsics.AddScalarU(a, dst); } else { for (int i = 0; i < dst.Length; i++) { dst[i] += a; } } }