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
@@ -456,7 +456,7 @@ public static partial class ULongExtensions
|
||||
{
|
||||
ulong result = 0UL;
|
||||
|
||||
GpuKernelLease lease = GpuKernelPool.GetKernel(useGpuOrder: true);
|
||||
GpuKernelLease lease = GpuKernelPool.GetKernel();
|
||||
|
||||
Accelerator accelerator = lease.Accelerator;
|
||||
// Keep this commented out. It should never happen in production code.
|
||||
@@ -479,7 +479,7 @@ public static partial class ULongExtensions
|
||||
kernel(stream, 1, exponentBuffer.View, divisor, resultBuffer.View);
|
||||
stream.Synchronize();
|
||||
|
||||
resultBuffer.View.CopyToCPU(ref result, 1);
|
||||
resultBuffer.View.CopyToCPU(stream, ref result, 1);
|
||||
|
||||
resultBuffer.Dispose();
|
||||
exponentBuffer.Dispose();
|
||||
|
||||
Reference in new issue
Block a user