PooledContext removal - continuation. GpuKernelLease prepared for removal.

This commit is contained in:
mlemanczyk committed 2025-11-07 14:13:11 +01:00
1 parent f4e365194d
commit 0410fd2c91
20 files changed
+192 -267

No files matched your search

+2 -1
View File
@@ -270,7 +270,7 @@ public sealed class DivisorCycleCache
var gpuLease = GpuKernelPool.Rent();
Accelerator accelerator = SharedGpuContext.Accelerator;
var stream = gpuLease.Stream;
var stream = accelerator.CreateStream();
var kernel = _gpuKernel;
EnsureCapacity(length);
@@ -338,6 +338,7 @@ public sealed class DivisorCycleCache
resultBuffer.View.CopyToCPU(stream, ref MemoryMarshal.GetReference(resultSpan), length);
stream.Synchronize();
stream.Dispose();
resultSpan.CopyTo(destination);
if (rentedPow is not null)