Route prime-order pow2 kernel through plain modular helper
This commit is contained in:
1 parent
7ef0906a9b
commit
716ffcb243
7 files changed
+78
-79
No files matched your search
@@ -109,6 +109,13 @@ internal sealed class MersenneNumberDivisorResidueGpuEvaluator : IDisposable
|
||||
}
|
||||
|
||||
ulong exponent = exponents[idx];
|
||||
results[idx] = exponent.Pow2MontgomeryModWindowedGpu(divisorData, keepMontgomery: true);
|
||||
ulong modulus = divisorData.Modulus;
|
||||
if (modulus <= 1UL || (modulus & 1UL) == 0UL)
|
||||
{
|
||||
results[idx] = 0UL;
|
||||
return;
|
||||
}
|
||||
|
||||
results[idx] = exponent.Pow2ModBinaryGpu(modulus);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user