-
Notifications
You must be signed in to change notification settings - Fork 211
Multiplication balancing for the Toom-Cook algorithms #206
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
Conversation
12a3b4e
to
27ca25c
Compare
@@ -624,9 +636,10 @@ | |||
#endif | |||
|
|||
#if defined(BN_MP_MUL_C) | |||
# define BN_FAST_S_MP_MUL_DIGS_C |
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.
lulz looks like that comment mentioning "fast_s_mp_mul_digs" triggers dep.pl
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.
Oh, great *sigh*
Had merge conflicts with tommath_class.h
and callgraph.txt
and thought the simplest way would be to just delete their content and let make new_file
do its thing.
Which seemed to work.
What to do: change my comment or patch dep.pl to ignore comments (which is quite complicated if you want to get all edgecases)?
Oh, you already merged it.
I'm too slow ;-)
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.
Which seemed to work.
it worked indeed.
What to do: change my comment or patch dep.pl to ignore comments
very good question!
@karel-m you're the perl guy I know, is there an easy way to fix this in dep.pl?
@@ -335,6 +335,7 @@ int mp_sub(const mp_int *a, const mp_int *b, mp_int *c); | |||
|
|||
/* c = a * b */ | |||
int mp_mul(const mp_int *a, const mp_int *b, mp_int *c); | |||
int mp_balance_mul(const mp_int *a, const mp_int *b, mp_int *c); |
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.
@czurnieden Is it intended that mp_balance_mul is exposed in the public api or should this rather go to tommath_private?
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.
Is it intended that mp_balance_mul is exposed in the public api
But everything is exposed?!
I know you fight it tooth and nails but LTM should make it explicit by using the methods offered by modern C-compilers and not by "hiding" it in another header.
But that discussion is for another day and another version.
should this rather go to tommath_private
You really don't need to tiptoe around me if you want something done, I'm a friendly bear ;-)
But as this PR is already merged and it is only a small, non-essential problem I would like to put it piggyback (but with a distinct commit for blaming) on one of the other PRs.
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.
@czurnieden I really care about the exposed API to be honest. This is what keeps the library nice and usable. To make this more clear private functions should be hidden symbols or at least be prefixed by s_.
I have some other minor comments incoming in a small PR. But no big deal.
Had been requested a long time ago (#2 ).