Zimmermann Paul <paul.zimmerm...@loria.fr> writes: > void mpn_mulmod_bnm1 (mp_ptr rp, mp_size_t rn, mp_srcptr ap, mp_size_t an, > mp_srcptr, bp, mp_size_t bn, mp_ptr tp) > Multiplies {ap, an} by {bp, bn} mod B^rn-1 where B=2^mp_bits_per_limb, > and stores the result into {rp, rn}. The scratch space tp is either NULL, > in which case the function allocates itself the needed memory, or it should > contain at least 2*rn+4 limbs (or the number of needed limbs should be > documented).
To find out the needed scratch space, you should use mpn_mulmod_bnm1_itch. Scratch need is going to change if/when the fft code (or general multiplication) is converted to an itch/scratch interface. If we make this interface public, should we advertise itch/scratch, or should we keep that detail internal, and require applications to always pass tp == NULL? Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org http://gmplib.org/mailman/listinfo/gmp-devel