From 4cfc7016ec711a6f2a16bf47a2f020ed65685b50 Mon Sep 17 00:00:00 2001 From: TechPizza Date: Tue, 18 May 2021 11:55:57 +0200 Subject: [PATCH] Added comment on Accumulate --- src/ImageSharp/Common/Helpers/Numerics.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/ImageSharp/Common/Helpers/Numerics.cs b/src/ImageSharp/Common/Helpers/Numerics.cs index f9969b27a..058199301 100644 --- a/src/ImageSharp/Common/Helpers/Numerics.cs +++ b/src/ImageSharp/Common/Helpers/Numerics.cs @@ -750,6 +750,23 @@ namespace SixLabors.ImageSharp => ((value2 - value1) * amount) + value1; #if SUPPORTS_RUNTIME_INTRINSICS + + /// + /// Accumulates 8-bit integers into by + /// widening them to 32-bit integers and performing four additions. + /// + /// + /// byte(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) + /// is widened and added onto as such: + /// + /// accumulator += i32(1, 2, 3, 4); + /// accumulator += i32(5, 6, 7, 8); + /// accumulator += i32(9, 10, 11, 12); + /// accumulator += i32(13, 14, 15, 16); + /// + /// + /// The accumulator destination. + /// The values to accumulate. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Accumulate(ref Vector accumulator, Vector values) {