Streams added to all kernels and GPU operations to separate threads from each other.
This commit is contained in:
1 parent
64d615c402
commit
de2a78b27b
30 files changed
+1097
-1002
No files matched your search
@@ -237,17 +237,18 @@ public sealed class HeuristicCombinedPrimeTester
|
||||
int divisorLength = GetCombinedDivisors(nMod10).Length;
|
||||
|
||||
int compositeFlag = 0;
|
||||
flagView1D.CopyFromCPU(ref compositeFlag, 1);
|
||||
flagView1D.CopyFromCPU(stream, ref compositeFlag, 1);
|
||||
kernel(
|
||||
stream,
|
||||
divisorLength,
|
||||
flagView,
|
||||
n,
|
||||
maxDivisorSquare,
|
||||
HeuristicGpuDivisorTableKind.Combined,
|
||||
gpu.HeuristicGpuTables);
|
||||
flagView1D.CopyToCPU(stream, ref compositeFlag, 1);
|
||||
stream.Synchronize();
|
||||
|
||||
flagView1D.CopyToCPU(stream, ref compositeFlag, 1);
|
||||
compositeDetected = compositeFlag != 0;
|
||||
|
||||
gpu.Dispose();
|
||||
|
||||
Reference in new issue
Block a user