diff --git a/src/NetFabric.Numerics.Tensors/AggregatePairs.cs b/src/NetFabric.Numerics.Tensors/AggregatePairs.cs index 0b0acc4..e49fe5a 100644 --- a/src/NetFabric.Numerics.Tensors/AggregatePairs.cs +++ b/src/NetFabric.Numerics.Tensors/AggregatePairs.cs @@ -29,6 +29,7 @@ public static ValueTuple AggregatePairs(ReadOnlySpan sour if (Vector.IsHardwareAccelerated && Vector.IsSupported && + Vector.Count > 2 && Vector.Count % 2 is 0 && source.Length >= Vector.Count) { diff --git a/src/NetFabric.Numerics.Tensors/ApplyBinary.cs b/src/NetFabric.Numerics.Tensors/ApplyBinary.cs index 45edacb..e482596 100644 --- a/src/NetFabric.Numerics.Tensors/ApplyBinary.cs +++ b/src/NetFabric.Numerics.Tensors/ApplyBinary.cs @@ -127,6 +127,7 @@ public static void Apply(ReadOnlySpan x, ValueTuple y, Sp if (useIntrinsics && Vector.IsHardwareAccelerated && Vector.IsSupported && + Vector.Count > 2 && Vector.Count % 2 is 0 && x.Length >= Vector.Count) { diff --git a/src/NetFabric.Numerics.Tensors/ApplyTernary.cs b/src/NetFabric.Numerics.Tensors/ApplyTernary.cs index b9c4a5b..39590c0 100644 --- a/src/NetFabric.Numerics.Tensors/ApplyTernary.cs +++ b/src/NetFabric.Numerics.Tensors/ApplyTernary.cs @@ -147,6 +147,7 @@ public static void Apply(ReadOnlySpan x, ValueTuple y, Re if (useIntrinsics && Vector.IsHardwareAccelerated && Vector.IsSupported && + Vector.Count > 2 && Vector.Count % 2 is 0 && x.Length >= Vector.Count) { @@ -270,6 +271,7 @@ public static void Apply(ReadOnlySpan x, ReadOnlySpan y, Val if (useIntrinsics && Vector.IsHardwareAccelerated && Vector.IsSupported && + Vector.Count > 2 && Vector.Count % 2 is 0 && x.Length >= Vector.Count) { @@ -383,6 +385,7 @@ public static void Apply(ReadOnlySpan x, ValueTuple y, Va if (useIntrinsics && Vector.IsHardwareAccelerated && Vector.IsSupported && + Vector.Count > 2 && Vector.Count % 2 is 0 && x.Length >= Vector.Count) {