-
Notifications
You must be signed in to change notification settings - Fork 147
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
Generalize IsMontgomeryConfiguration
and MontgomeryBackendPrimeField
#126
Comments
IsMontgomeryConfiguration
and 'MontgomeryBackendPrimeField'IsMontgomeryConfiguration
and MontgomeryBackendPrimeField
Don't generalize it over the trait, we just need it to work with |
This backend is to make generally optimized code and enable a fast implementation of any field. The |
Leaving that aside, the problem there is that you are using a trait, so you can't use |
Tanks a lot Mauro, you are truly a Rust warlock. So instead of generalize for any object with |
I see the difference, thanks a lot. Generalizing through NUM_LIMS I can access all methods of |
* fix mul_two_256_bit_integers_works_4() test Test mul_two_256_bit_integers_works_4() fixed after the bug in the * operator patched * Update element.rs * Update element.rs * get rid of space * Update element.rs * Generalize IsMontgomeryConfiguration and MontgomeryBackendPrimeField Solves #126 * Extended U256 Montgomery backed prime fields test * Implemented U256PrimeField solves #95 * Conflicts fixed * fmt * Get rid of unused commented lines * Update montgomery_backed_prime_fields.rs
In order to solve #95 without repeat code i tried to generalize
IsMontgomeryConfiguration
trait andMontgomeryBackendPrimeField
struct to allow usage with anyUnsignedInteger
.Tried something like this:
If i use a generic U:
IsUnsignedInteger
:Any idea to define a generic to generalize any type
UnsignedInteger<_>
struct like?The text was updated successfully, but these errors were encountered: