Clarify per-divisor Montgomery recomputation
This commit is contained in:
1 parent
b2b71f705a
commit
f9d51efe94
2 files changed
+21
-43
No files matched your search
@@ -412,6 +412,8 @@ public sealed class MersenneNumberDivisorByDivisorGpuTester : IMersenneNumberDiv
|
||||
ulong divisorValue = filteredDivisorsSpan[i];
|
||||
divisorSpan[i] = divisorValue;
|
||||
exponentSpan[i] = prime;
|
||||
// Divisors never repeat while scanning the monotonically increasing sequence, so regenerate
|
||||
// the Montgomery data for each entry rather than storing cache lines that no future batch would hit.
|
||||
divisorDataSpan[i] = MontgomeryDivisorData.FromModulus(divisorValue);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user