Added static IsPrimeGpu

This commit is contained in:
mlemanczyk committed 2025-10-21 04:09:26 +02:00
1 parent ea11db6d0f
commit 31a0b8d706
1 file changed
+2
+2
View File
@@ -15,6 +15,8 @@ public sealed class PrimeTester(bool useInternal = false)
// indirection shows up when we sieve millions of candidates per second.
IsPrimeInternal(n, ct);
public static bool IsPrimeGpu(ulong n) => new PrimeTester().IsPrimeGpu(n, CancellationToken.None);
// Optional GPU-assisted primality: batched small-prime sieve on device.
public bool IsPrimeGpu(ulong n, CancellationToken ct)
{