Avoid redundant compaction buffer clearing on GPU
This commit is contained in:
1 parent
dda53581c0
commit
f672ff520c
3 files changed
+7
-6
No files matched your search
@@ -232,8 +232,10 @@ internal static class DivisorByDivisorKernels
|
||||
|
||||
int lastLaneMask = globalIndex == length - 1 ? 1 : 0;
|
||||
int countValue = shared[prefixBase + localIndex];
|
||||
int storedCount = lastLaneMask != 0 ? countValue : 0;
|
||||
Atomic.Max(ref compactedCount[0], storedCount);
|
||||
if (lastLaneMask != 0)
|
||||
{
|
||||
compactedCount[0] = countValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static void PublishFirstHitKernel(
|
||||
|
||||
@@ -600,7 +600,6 @@ public sealed class MersenneNumberDivisorByDivisorGpuTester : IMersenneNumberDiv
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
countView.MemSetToZero();
|
||||
SharedMemoryConfig sharedMemoryConfig = SharedMemoryConfig.RequestDynamic<int>(count * 3);
|
||||
Index1D gridDim = new Index1D(1);
|
||||
Index1D groupDim = new Index1D(count);
|
||||
|
||||
Reference in new issue
Block a user