Inline GPU kernel state into prime tester leases
This commit is contained in:
1 parent
23fa56b356
commit
a4ac82e74d
3 files changed
+300
-280
No files matched your search
@@ -269,7 +269,7 @@ public sealed class HeuristicPrimeTester
|
||||
var limiter = GpuPrimeWorkLimiter.Acquire();
|
||||
var gpu = PrimeTester.PrimeTesterGpuContextPool.Rent(batchCapacity);
|
||||
var accelerator = gpu.Accelerator;
|
||||
var state = gpu.State;
|
||||
var kernel = gpu.HeuristicTrialDivisionKernel;
|
||||
|
||||
bool compositeDetected = false;
|
||||
int count = 0;
|
||||
@@ -282,7 +282,7 @@ public sealed class HeuristicPrimeTester
|
||||
inputView.CopyFromCPU(ref divisorArray[0], length);
|
||||
byte compositeFlag = 0;
|
||||
outputView.CopyFromCPU(ref compositeFlag, 1);
|
||||
state.HeuristicTrialDivisionKernel(length, inputView, n, outputView);
|
||||
kernel(length, inputView, n, outputView);
|
||||
accelerator.Synchronize();
|
||||
outputView.CopyToCPU(ref compositeFlag, 1);
|
||||
|
||||
|
||||
Reference in new issue
Block a user