Skip to content

Commit 4cfc701

Browse files
committed
Added comment on Accumulate
1 parent 5c7f4a9 commit 4cfc701

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/ImageSharp/Common/Helpers/Numerics.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,23 @@ public static float Lerp(float value1, float value2, float amount)
750750
=> ((value2 - value1) * amount) + value1;
751751

752752
#if SUPPORTS_RUNTIME_INTRINSICS
753+
754+
/// <summary>
755+
/// Accumulates 8-bit integers into <paramref name="accumulator"/> by
756+
/// widening them to 32-bit integers and performing four additions.
757+
/// </summary>
758+
/// <remarks>
759+
/// <code>byte(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)</code>
760+
/// is widened and added onto <paramref name="accumulator"/> as such:
761+
/// <code>
762+
/// accumulator += i32(1, 2, 3, 4);
763+
/// accumulator += i32(5, 6, 7, 8);
764+
/// accumulator += i32(9, 10, 11, 12);
765+
/// accumulator += i32(13, 14, 15, 16);
766+
/// </code>
767+
/// </remarks>
768+
/// <param name="accumulator">The accumulator destination.</param>
769+
/// <param name="values">The values to accumulate.</param>
753770
[MethodImpl(MethodImplOptions.AggressiveInlining)]
754771
public static void Accumulate(ref Vector<uint> accumulator, Vector<byte> values)
755772
{

0 commit comments

Comments
 (0)