--mersenne=bydivisor testers and sessions integrated and converted to structs.
This commit is contained in:
1 parent
3c80221105
commit
2abc6aae49
32 files changed
+3814
-1505
No files matched your search
@@ -5,32 +5,20 @@ namespace PerfectNumbers.Core;
|
||||
|
||||
public interface IMersenneNumberDivisorByDivisorTester
|
||||
{
|
||||
int BatchSize { get; set; }
|
||||
|
||||
BigInteger MinK { get; set; }
|
||||
|
||||
void ConfigureFromMaxPrime(ulong maxPrime);
|
||||
|
||||
ulong DivisorLimit { get; }
|
||||
|
||||
ulong GetAllowedMaxDivisor(ulong prime);
|
||||
|
||||
bool IsPrime(PrimeOrderCalculatorAccelerator gpu, ulong prime, out bool divisorsExhausted, out BigInteger divisor);
|
||||
bool IsPrime(ulong prime, out bool divisorsExhausted, out BigInteger divisor);
|
||||
|
||||
IDivisorScanSession CreateDivisorSession(PrimeOrderCalculatorAccelerator gpu);
|
||||
|
||||
string? StateFilePath { get; set; }
|
||||
|
||||
void ResetStateTracking();
|
||||
|
||||
void ResumeFromState(BigInteger lastSavedK);
|
||||
void ResumeFromState(in string stateFile, in BigInteger lastSavedK, in BigInteger minK);
|
||||
|
||||
void PrepareCandidates(in ReadOnlySpan<ulong> primes, Span<ulong> allowedMaxValues);
|
||||
void PrepareCandidates(ulong maxPrime, in ReadOnlySpan<ulong> primes, Span<ulong> allowedMaxValues);
|
||||
|
||||
public interface IDivisorScanSession
|
||||
{
|
||||
bool CheckDivisor(ulong divisor, in MontgomeryDivisorData divisorData, ulong divisorCycle, in ReadOnlySpan<ulong> primes);
|
||||
|
||||
void Return();
|
||||
// void Return();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user