Tiny optimization
This commit is contained in:
1 parent
4c79c4087e
commit
b2865b54ce
1 file changed
+1
-6
@@ -180,7 +180,7 @@ public sealed class HeuristicCombinedPrimeTester
|
|||||||
|
|
||||||
private static bool HeuristicTrialDivisionGpuDetectsDivisor(ulong n, ulong sqrtLimit, byte nMod10)
|
private static bool HeuristicTrialDivisionGpuDetectsDivisor(ulong n, ulong sqrtLimit, byte nMod10)
|
||||||
{
|
{
|
||||||
int batchCapacity = Math.Max(1, HeuristicGpuDivisorBatchSize);
|
int batchCapacity = HeuristicGpuDivisorBatchSize;
|
||||||
var divisorPool = ThreadStaticPools.UlongPool;
|
var divisorPool = ThreadStaticPools.UlongPool;
|
||||||
var hitPool = ThreadStaticPools.BytePool;
|
var hitPool = ThreadStaticPools.BytePool;
|
||||||
|
|
||||||
@@ -201,11 +201,6 @@ public sealed class HeuristicCombinedPrimeTester
|
|||||||
|
|
||||||
bool ProcessBatch(int length)
|
bool ProcessBatch(int length)
|
||||||
{
|
{
|
||||||
if (length <= 0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
input.View.CopyFromCPU(ref divisorArray[0], length);
|
input.View.CopyFromCPU(ref divisorArray[0], length);
|
||||||
state.HeuristicTrialDivisionKernel(length, input.View, n, output.View);
|
state.HeuristicTrialDivisionKernel(length, input.View, n, output.View);
|
||||||
accelerator.Synchronize();
|
accelerator.Synchronize();
|
||||||
|
|||||||
Reference in new issue
Block a user