mul_fft.c

Kevin Ryde user42@zip.com.au
Wed, 16 Jul 2003 09:54:17 +1000


Jason Moxham <j.l.moxham@maths.soton.ac.uk> writes:
>
> looking at mpn/generic/mul_fft.c its not entirely clear how to call a  
> "mpn_mul_mod_2^k+1"(mp_ptr dest,mp_srcptr src1,mp_srcptr src2,mp_size_t k) 
> // dest= src1*src2 % 2^(k*GMP_NUMB_BITS)+1

I think mpn_mul_fft is the entrypoint, it sets {op,pl} to {n,nl} *
{m,ml} modulo 2^{pl*GMP_NUMB_BITS}, or something like that.  pl needs
to be one of the permitted fft lengths, ie. already padded out to a
suitable size for the given k parameter.

In tune/speed.h, SPEED_ROUTINE_MPN_MUL_FFT_CALL is a sample call (it
ignores the return from mpn_mul_fft, that being the high bit of the
result, or something like that).