PrimeOrderCalculator.PartialFactorCpu simplified to work only with spans and throw exception if the number of factors is exceeded. PrimeOrderMode removed in favor of bool flag.

This commit is contained in:
mlemanczyk committed 2025-12-10 12:47:25 +01:00
1 parent 72890bf343
commit 7a242b3bfa
15 files changed
+337 -302

No files matched your search

@@ -9,7 +9,7 @@ internal static partial class PrimeOrderCalculator
ulong prime,
ulong? previousOrder,
in MontgomeryDivisorData divisorData,
in PrimeOrderSearchConfig config)
in PrimeOrderCalculatorConfig config)
{
// TODO: Is this condition ever met on EvenPerfectBitScanner's execution path? If not, we can add a clarification comment and comment out the entire block. We want to support p candidates at least greater or equal to 31.
if (prime <= 3UL)
@@ -40,7 +40,7 @@ internal static partial class PrimeOrderCalculator
PrimeOrderCalculatorAccelerator gpu,
in UInt128 prime,
in UInt128? previousOrder,
in PrimeOrderSearchConfig config)
in PrimeOrderCalculatorConfig config)
{
MontgomeryDivisorData divisorData;
UInt128 result;