Various optimizations to separate non-static data between threads and resolve read/write access issue.
This commit is contained in:
1 parent
5a17fa64d5
commit
64d615c402
26 files changed
+1181
-1117
No files matched your search
@@ -5,7 +5,7 @@ using ILGPU.Runtime;
|
||||
|
||||
namespace PerfectNumbers.Core.Gpu;
|
||||
|
||||
internal static class SharedGpuContext
|
||||
public static class SharedGpuContext
|
||||
{
|
||||
private static readonly Lazy<Context> s_context = new(() => ILGPU.Context.CreateDefault(), LazyThreadSafetyMode.ExecutionAndPublication);
|
||||
private static readonly Lazy<Device> s_device = new(() => s_context.Value.GetPreferredDevice(false), LazyThreadSafetyMode.ExecutionAndPublication);
|
||||
|
||||
Reference in new issue
Block a user