From ad19096bab48564e869b0ee201740e9d4fa956e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Lema=C5=84czyk?= Date: Fri, 24 Oct 2025 21:59:51 +0200 Subject: [PATCH] Use constant residue initialization in GPU stepper --- PerfectNumbers.Core/Gpu/ExponentRemainderStepperGpu.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PerfectNumbers.Core/Gpu/ExponentRemainderStepperGpu.cs b/PerfectNumbers.Core/Gpu/ExponentRemainderStepperGpu.cs index 0d1dc90..d322406 100644 --- a/PerfectNumbers.Core/Gpu/ExponentRemainderStepperGpu.cs +++ b/PerfectNumbers.Core/Gpu/ExponentRemainderStepperGpu.cs @@ -21,7 +21,7 @@ internal struct ExponentRemainderStepperGpu _modulus = modulus; _modulusWide = divisor.ModulusWide; PreviousExponent = 0UL; - _currentResidue = new GpuUInt128(1UL); + _currentResidue = GpuUInt128.One; } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -38,7 +38,7 @@ internal struct ExponentRemainderStepperGpu public void Reset() { PreviousExponent = 0UL; - _currentResidue = new GpuUInt128(1UL); + _currentResidue = GpuUInt128.One; } ///