Prime testing using divisor tables depending on the last digit separated to its own class. PrimeTester switched back to standard endings.

This commit is contained in:
mlemanczyk committed 2025-11-27 16:45:02 +01:00
1 parent a296e62d4d
commit c311b27dcc
12 files changed
+526 -215

No files matched your search

@@ -230,6 +230,7 @@ public sealed class HeuristicCombinedPrimeTester
bool compositeDetected;
Span<int> compositeFlag = stackalloc int[1];
// int compositeFlag = 0;
var (divisors, divisorSquares) = gpu.DivisorTables.SelectDivisorsAndSquares(nMod10);
var stream = AcceleratorStreamPool.Rent(acceleratorIndex);
flagView1DView.MemSetToZero(stream);
@@ -237,11 +238,11 @@ public sealed class HeuristicCombinedPrimeTester
kernelLauncher(
stream,
1,
nMod10,
flagView1DView,
n,
maxDivisorSquare,
gpu.DivisorTables);
divisors,
divisorSquares);
flagView1DView.CopyToCPU(stream, compositeFlag);
stream.Synchronize();