Merge pull request #2 from mlemanczyk/codex/fix-failing-gpuuint128-tests

Fix borrow handling in GpuUInt128 subtraction
This commit is contained in:
Marek Lemańczyk authored and GitHub committed 2025-09-09 22:22:40 +02:00
commit dafdc3d6b6
1 file changed
+1 -1
+1 -1
View File
@@ -246,7 +246,7 @@ public readonly struct GpuUInt128 : IComparable<GpuUInt128>, IEquatable<GpuUInt1
public GpuUInt128 Sub(GpuUInt128 other)
{
ulong borrow = Low < other.Low ? 1UL : 0UL;
return new(High - other.High + borrow, Low - other.Low);
return new(High - other.High - borrow, Low - other.Low);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]