Stream handling simplified to avoid dictionary lookups in favor of array lookups with known indexes.

This commit is contained in:
mlemanczyk committed 2025-11-16 15:01:51 +01:00
1 parent cd7636ddbe
commit a84445ef2a
15 files changed
+67 -73

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ public class GpuKernelPool
internal static KernelContainer GetOrAddKernels(int acceleratorIndex, AcceleratorStream stream, KernelType kernelType)
{
var pool = _pool ??= [];
var pool = _pool ??= new KernelContainer[PerfectNumberConstants.RollingAccelerators];
if (pool[acceleratorIndex] is not {} kernels)
{
kernels = new();