diff --git a/PerfectNumbers.Core/PrimeTester.cs b/PerfectNumbers.Core/PrimeTester.cs index cffad8d..2a177ff 100644 --- a/PerfectNumbers.Core/PrimeTester.cs +++ b/PerfectNumbers.Core/PrimeTester.cs @@ -15,8 +15,10 @@ public sealed class PrimeTester(bool useInternal = false) // indirection shows up when we sieve millions of candidates per second. IsPrimeInternal(n, ct); - // Optional GPU-assisted primality: batched small-prime sieve on device. - public bool IsPrimeGpu(ulong n, CancellationToken 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) { if (GpuContextPool.ForceCpu) {