Unify GPU divisor kernels with stepper path
This commit is contained in:
1 parent
868c7a4fd2
commit
4e9d57df4b
4 files changed
+243
-127
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user