Split CPU and GPU exponent steppers

This commit is contained in:
Marek Lemańczyk committed 2025-10-24 08:49:53 +02:00
1 parent 035956cdb6
commit 1e5a9128cb
9 files changed
+366 -128

No files matched your search

@@ -42,7 +42,7 @@ internal sealed class MersenneCpuDivisorScanSession : IMersenneNumberDivisorByDi
// Keep these remainder steppers in place so future updates continue reusing the previously computed residues.
// They are critical for avoiding repeated full Montgomery exponentiation work when scanning divisors.
var exponentStepper = new ExponentRemainderStepper(cachedData);
var exponentStepper = new ExponentRemainderStepperCpu(cachedData);
var cycleStepper = new CycleRemainderStepper(divisorCycle);
@@ -196,7 +196,7 @@ public sealed class MersenneNumberDivisorByDivisorCpuTester : IMersenneNumberDiv
// }
// else
{
if (!MersenneDivisorCycles.TryCalculateCycleLengthForExponent(
if (!MersenneDivisorCycles.TryCalculateCycleLengthForExponentCpu(
candidate,
prime,
divisorData,