Hoist prime order thresholds in CPU heuristics
This commit is contained in:
1 parent
1bd3d5c163
commit
94a4ed8328
12 files changed
+670
-351
No files matched your search
@@ -0,0 +1,35 @@
|
||||
# --mersenne=bydivisor Path Map
|
||||
|
||||
This temporary map tracks the code paths exercised by the `--mersenne=bydivisor` mode and notes the latest review status for each branch. Entries move from _Queued_ to _Reviewed_ once the surrounding loops have been audited for invariant work.
|
||||
|
||||
## High-level Flow
|
||||
- `EvenPerfectBitScanner` CLI parsing → _Reviewed_
|
||||
- `MersenneNumberDivisorByDivisorTester.Run` → _Reviewed_
|
||||
- `EvenPerfectBitScanner.IO.CalculationResultsFile`
|
||||
- `LoadCandidatesWithinRange` → _Reviewed_
|
||||
- `EnumerateCandidates` → _Reviewed_
|
||||
- `IMersenneNumberDivisorByDivisorTester` implementations
|
||||
- `MersenneNumberDivisorByDivisorCpuTester`
|
||||
- `IsPrime` → _Reviewed_
|
||||
- `CheckDivisors` (128-bit path) → _Reviewed_
|
||||
- `CheckDivisors64` → _Reviewed_
|
||||
- `MersenneNumberDivisorByDivisorGpuTester`
|
||||
- `IsPrime` → _Reviewed_
|
||||
- `CheckDivisors` → _Reviewed_
|
||||
- `DivisorByDivisorKernels.CheckKernel` → _Reviewed_
|
||||
|
||||
- `MersenneDivisorCycles`
|
||||
- `TryCalculateCycleLengthForExponentCpu` → _Reviewed_
|
||||
- `TryFactorIntoCountsInternal` → _Reviewed_
|
||||
- `PollardRho64` → _Reviewed_
|
||||
- `ReduceOrder` (includes `ProcessReduceOrderPrime`) → _Reviewed_
|
||||
- `PrimeOrderCalculator`
|
||||
- `InitializeStartingOrderCpu` → _Reviewed_
|
||||
- `ExponentLoweringCpu` / `ProcessExponentLoweringPrime` → _Reviewed_
|
||||
- `ValidateOrderAgainstFactors` / `ValidateOrderForFactor` → _Reviewed_
|
||||
- `TryConfirmCandidateCpu` / `CheckCandidateViolation` → _Reviewed_
|
||||
- `TryHeuristicFinishCpu` / `BuildCandidates` / `SortCandidates` → _Reviewed_
|
||||
|
||||
## Next Steps
|
||||
- Hold for additional guidance on further --mersenne=bydivisor audits; computation branches documented above are fully reviewed.
|
||||
- Defer result aggregation and reporting reviews until instructed otherwise, keeping the focus on computation-only branches.
|
||||
@@ -136,7 +136,7 @@ The plan incorporates the updated divisor-class heuristics (Groups A/B, wheels,
|
||||
* [done] Kept GPU divisibility in standard modular arithmetic while reserving Montgomery transforms for CPU confirmation logic.
|
||||
* [done] When the temporary Group B gate is disabled, delegate GPU calls to the CPU fallback so Group A coverage remains in place while the accelerator path stays available for future re-enablement.
|
||||
8. [done] **Refactor by-divisor CPU/GPU testers to reuse heuristics**
|
||||
* [done] Drove `MersenneNumberDivisorByDivisorCpuTester.CheckDivisors` from `HeuristicPrimeTester.CreateMersenneDivisorEnumerator`, eliminating the bespoke residue loop while preserving the existing status counters.
|
||||
* [done] Drove `MersenneNumberDivisorByDivisorCpuTester.CheckDivisors` from `HeuristicPrimeTester.CreateMersenneDivisorEnumerator`, eliminating the bespoke residue loop and retiring the legacy status counter.
|
||||
* [done] Streamed GPU batches from the same enumerator and Montgomery preparation data, removing the filtered-divisor scratch arrays while continuing to feed the existing kernel and hit bookkeeping.
|
||||
9. [done] **Route legacy prime checks through heuristics**
|
||||
* [done] Introduce `HeuristicPrimeTester` so heuristic CPU/GPU checks live alongside the legacy `PrimeTester` implementations while callers opt in explicitly.
|
||||
|
||||
Reference in new issue
Block a user