BitContradiction adjusted for p >= 138 mln, based on carry out analysis of the first 1024 columns.
This commit is contained in:
1 parent
22cc8f368f
commit
fea95509a7
2 files changed
+222
-58
No files matched your search
@@ -62,6 +62,9 @@ public struct MersenneNumberDivisorByDivisorCpuTesterWithTemplate() : IMersenneN
|
||||
private GpuUInt128WorkSet _divisorScanGpuWorkSet;
|
||||
private static readonly ConcurrentDictionary<ulong, byte> _checkedPow2MinusOne = new();
|
||||
private ulong _currentPrime;
|
||||
#if WITH_PRUNE_STATS
|
||||
private readonly TimeSpan _slowCalculationThreshold = TimeSpan.FromMilliseconds(700);
|
||||
#endif
|
||||
|
||||
#if DEVICE_GPU && DivisorSet_BitContradiction
|
||||
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
|
||||
@@ -5104,6 +5107,10 @@ public struct MersenneNumberDivisorByDivisorCpuTesterWithTemplate() : IMersenneN
|
||||
BigInteger divisor = (step * currentK) + BigInteger.One;
|
||||
_qBits = new int[(int)prime];
|
||||
Stopwatch sw = new Stopwatch();
|
||||
#if WITH_PRUNE_STATS
|
||||
var slowCalculationThreshold = _slowCalculationThreshold;
|
||||
#endif
|
||||
|
||||
// sw.Start();
|
||||
while (true)
|
||||
{
|
||||
@@ -5143,6 +5150,13 @@ public struct MersenneNumberDivisorByDivisorCpuTesterWithTemplate() : IMersenneN
|
||||
}
|
||||
else
|
||||
{
|
||||
#if WITH_PRUNE_STATS
|
||||
if (sw.Elapsed >= slowCalculationThreshold)
|
||||
{
|
||||
Console.WriteLine($"SLOW CALCULATIONS: Prime {prime} ({sw.Elapsed}: {divisor})");
|
||||
_consolePrintOut = 0;
|
||||
}
|
||||
#else
|
||||
var printToConsole = (_consolePrintOut++) == PerfectNumberConstants.ConsoleInterval;
|
||||
if (printToConsole)
|
||||
{
|
||||
@@ -5152,6 +5166,7 @@ public struct MersenneNumberDivisorByDivisorCpuTesterWithTemplate() : IMersenneN
|
||||
// sw.Reset();
|
||||
// sw.Start();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if DETAILED_LOG
|
||||
|
||||
Reference in new issue
Block a user