-
Notifications
You must be signed in to change notification settings - Fork 323
precompiles: Implement expmod with GMP #1198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
592d65b
to
9e8c99a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1198 +/- ##
==========================================
- Coverage 94.84% 94.79% -0.05%
==========================================
Files 171 172 +1
Lines 19501 19515 +14
==========================================
+ Hits 18496 18500 +4
- Misses 1005 1015 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
e015ea5
to
36e817f
Compare
9e8c99a
to
647213b
Compare
test/state/CMakeLists.txt
Outdated
@@ -72,3 +72,16 @@ if(EVMONE_PRECOMPILES_SILKPRE) | |||
precompiles_silkpre.cpp | |||
) | |||
endif() | |||
|
|||
# This is done after Silkpre because it also tries to find GMP. | |||
option(EVMONE_PRECOMPILES_GMP "Enable precompiles implementations via the GMP/MPIR library" ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On by default seems to cause a lot of build issues. Maybe use the same strategy as with SILKPRE (OFF by default).
@@ -72,3 +72,16 @@ if(EVMONE_PRECOMPILES_SILKPRE) | |||
precompiles_silkpre.cpp | |||
) | |||
endif() | |||
|
|||
# This is done after Silkpre because it also tries to find GMP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SILKPRE option stays for benchmarking purposes only.
mpz_import(b, base.size(), 1, 1, 0, 0, base.data()); | ||
mpz_import(e, exp.size(), 1, 1, 0, 0, exp.data()); | ||
mpz_import(m, mod.size(), 1, 1, 0, 0, mod.data()); | ||
assert(mpz_sgn(m) != 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should document in the expmod_xxx
interface that the mod
is expected non-zero.
647213b
to
b134080
Compare
No description provided.