Simplify prime guards and adopt unified mulmod
This commit is contained in:
1 parent
3f5904c340
commit
af909e9e2d
11 files changed
+236
-189
No files matched your search
@@ -103,10 +103,12 @@ internal sealed class MersenneNumberDivisorResidueGpuEvaluator : IDisposable
|
||||
{
|
||||
int idx = index;
|
||||
int length = (int)exponents.Length;
|
||||
if (idx >= length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Batched launches match the buffer length on production workloads, so the bounds guard stays commented out to remove
|
||||
// the redundant comparison.
|
||||
// if (idx >= length)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
ulong exponent = exponents[idx];
|
||||
ulong modulus = divisorData.Modulus;
|
||||
|
||||
Reference in new issue
Block a user