Unify GPU divisor kernels with stepper path

This commit is contained in:
Marek Lemańczyk committed 2025-10-24 20:50:52 +02:00
1 parent 868c7a4fd2
commit 4e9d57df4b
4 files changed
+243 -127

No files matched your search

+13
View File
@@ -2,6 +2,7 @@ using System.Buffers;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using PerfectNumbers.Core.Cpu;
using PerfectNumbers.Core.Gpu;
namespace PerfectNumbers.Core
{
@@ -102,6 +103,18 @@ namespace PerfectNumbers.Core
}
}
[ThreadStatic]
private static ArrayPool<GpuDivisorPartialData>? _gpuDivisorPartialDataPool;
internal static ArrayPool<GpuDivisorPartialData> GpuDivisorPartialDataPool
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return _gpuDivisorPartialDataPool ??= ArrayPool<GpuDivisorPartialData>.Create();
}
}
[ThreadStatic]
private static ArrayPool<int>? _intPool;