Shared toom evaluation functions
bodrato at mail.dm.unipi.it
bodrato at mail.dm.unipi.it
Mon Nov 16 11:39:18 CET 2009
Ciao Torbjorn,
> I forgot to say: Please test that on sopme x86_64 machine (make && make
check) shoudl do it, and then commit it!
Done.
> I checked in a aorrlsh2_n for x86_64. It runs at 2.5 c/l on AMD K8-K10
and 3.0 c/l on Core 2 and i7.
>
> You said it was useful. Now use it. :-)
Done :-)
Both evaluation I changed used addlsh_n(.,.,.,2); and both had a small
bug, that remained undetected, because we don't HAVE_NATIVE_mpn_addlsh_n,
anywhere.
toom4_sqr, toom44, toom43, and toom53 benefit of it.
Toom-4.5, 6.5, and 8.5 will too, but not yet.
I went back home yesterday and I'm leaving again tomorrow... I don't think
I'll update higher Tooms soon.
Niels should revive its toom_eval_pm2.c... and use the new functions.
> (I was lazy and did not define the rsblsh1_n return value. If you need
it, we can fix that.)
I can't see any use for rsblsh2_n, yet. sublsh2_n could be used in
toom_interpolate_6pts.c#l137, maybe also rsblsh2_n can be used there,
obtaining -w2 and changing the sign again later.
About rsblsh1_n: comments in gmp-impl.h declare that it "returns the
borrow out (-1, 0, 1)", but if we mean borrow = -carry... then it seems
like it returns "the carry". I'm using it and it works.
Regards,
Marco
--
http://bodrato.it/papers/
More information about the gmp-devel
mailing list