We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a526d84 commit e345857Copy full SHA for e345857
src/ImageSharp/Common/Helpers/Numerics.cs
@@ -817,6 +817,12 @@ public static int ReduceSum(Vector256<int> accumulator)
817
[MethodImpl(InliningOptions.ShortMethod)]
818
public static int ReduceSumArm(Vector128<uint> accumulator)
819
{
820
+ if (AdvSimd.Arm64.IsSupported)
821
+ {
822
+ Vector64<uint> sum = AdvSimd.Arm64.AddAcross(accumulator);
823
+ return (int)AdvSimd.Extract(sum, 0);
824
+ }
825
+
826
Vector128<ulong> sum2 = AdvSimd.AddPairwiseWidening(accumulator);
827
Vector64<uint> sum3 = AdvSimd.Add(sum2.GetLower().AsUInt32(), sum2.GetUpper().AsUInt32());
828
return (int)AdvSimd.Extract(sum3, 0);
0 commit comments