Various small optimizations

This commit is contained in:
mlemanczyk committed 2025-11-01 03:42:36 +01:00
1 parent b7c34f4960
commit 22f20bfe98
14 files changed
+206 -280

No files matched your search

@@ -37,7 +37,7 @@ public sealed class MersenneNumberDivisorGpuTester
public bool IsDivisible(ulong exponent, in ReadOnlyGpuUInt128 divisor)
{
var gpu = GpuContextPool.RentPreferred(preferCpu: false);
var gpu = GpuContextPool.Rent();
var accelerator = gpu.Accelerator;
var kernel = GetKernel(accelerator);
var resultBuffer = _resultBuffers.GetOrAdd(accelerator, acc => acc.Allocate1D<byte>(1));