Add CPU by-divisor tester and integrate interface
This commit is contained in:
1 parent
854e8aaf34
commit
1a3b75a52f
5 files changed
+675
-27
No files matched your search
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace PerfectNumbers.Core;
|
||||
|
||||
public interface IMersenneNumberDivisorByDivisorTester
|
||||
{
|
||||
bool UseDivisorCycles { get; set; }
|
||||
|
||||
int BatchSize { get; set; }
|
||||
|
||||
void ConfigureFromMaxPrime(ulong maxPrime);
|
||||
|
||||
ulong DivisorLimit { get; }
|
||||
|
||||
ulong GetAllowedMaxDivisor(ulong prime);
|
||||
|
||||
bool IsPrime(ulong prime, out bool divisorsExhausted);
|
||||
|
||||
IDivisorScanSession CreateDivisorSession();
|
||||
|
||||
public interface IDivisorScanSession : IDisposable
|
||||
{
|
||||
void CheckDivisor(ulong divisor, ulong divisorCycle, ReadOnlySpan<ulong> primes, Span<byte> hits);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user