Small primes array type changed to uint[] to avoid excessive memory use, especially on GPU

This commit is contained in:
Marek Lemańczyk committed 2025-09-09 23:58:09 +02:00
1 parent dafdc3d6b6
commit 2be49020a9
6 files changed
+63 -90

No files matched your search

@@ -3,7 +3,7 @@ namespace PerfectNumbers.Core;
public static class PerfectNumberConstants
{
public const ulong BiggestKnownEvenPerfectP = 136279841UL;
public static readonly ulong PrimesLimit = 1_000_000; //(ulong)Array.MaxLength;// 1_000_000;
public static readonly uint PrimesLimit = 1_000_000; //(ulong)Array.MaxLength;// 1_000_000;
// Maximum K for residue-based Mersenne test (q = 2*p*k + 1 up to this k)
public static readonly UInt128 ResidueMaxK = 5_000_000UL;