Address feedback on GPU pooling and heuristic factoring
This commit is contained in:
1 parent
567b92792c
commit
8c662c5c85
6 files changed
+92
-139
No files matched your search
@@ -235,21 +235,18 @@ public sealed class HeuristicCombinedPrimeTester
|
||||
bool compositeDetected = false;
|
||||
int divisorLength = GetCombinedDivisors(nMod10).Length;
|
||||
|
||||
if (divisorLength > 0)
|
||||
{
|
||||
int compositeFlag = 0;
|
||||
flagView1D.CopyFromCPU(ref compositeFlag, 1);
|
||||
kernel(
|
||||
divisorLength,
|
||||
flagView,
|
||||
n,
|
||||
maxDivisorSquare,
|
||||
HeuristicGpuDivisorTableKind.Combined,
|
||||
gpu.HeuristicGpuTables);
|
||||
accelerator.Synchronize();
|
||||
flagView1D.CopyToCPU(ref compositeFlag, 1);
|
||||
compositeDetected = compositeFlag != 0;
|
||||
}
|
||||
int compositeFlag = 0;
|
||||
flagView1D.CopyFromCPU(ref compositeFlag, 1);
|
||||
kernel(
|
||||
divisorLength,
|
||||
flagView,
|
||||
n,
|
||||
maxDivisorSquare,
|
||||
HeuristicGpuDivisorTableKind.Combined,
|
||||
gpu.HeuristicGpuTables);
|
||||
accelerator.Synchronize();
|
||||
flagView1D.CopyToCPU(ref compositeFlag, 1);
|
||||
compositeDetected = compositeFlag != 0;
|
||||
|
||||
gpu.Dispose();
|
||||
limiter.Dispose();
|
||||
|
||||
Reference in new issue
Block a user