Additional checks will be skipped in bydivisor mode to speed up calculations. Console output extended.

This commit is contained in:
Marek Lemańczyk committed 2025-09-21 14:23:56 +02:00
1 parent 562d2adc3e
commit d117921c3a
2 files changed
+241 -231

No files matched your search

@@ -274,12 +274,19 @@ public sealed class MersenneNumberDivisorByDivisorGpuTester
}
int offset = 0;
int consoleStatus = 0;
while (offset < primes.Length)
{
int batchSize = Math.Min(_owner._gpuBatchSize, primes.Length - offset);
Span<ulong> primeSpan = _primesHost.AsSpan(0, batchSize);
primes.Slice(offset, batchSize).CopyTo(primeSpan);
if (++consoleStatus == PerfectNumberConstants.ConsoleInterval)
{
Console.WriteLine($"...processed by-divisor candidate = {primes[0]}");
consoleStatus = 0;
}
var primesView = _primesBuffer.View.SubView(0, batchSize);
var hitsView = _hitsBuffer.View.SubView(0, batchSize);