=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/fft/fft_primes.c,v retrieving revision 1.2 retrieving revision 1.6 diff -u -p -r1.2 -r1.6 --- OpenXM_contrib2/asir2000/fft/fft_primes.c 2000/08/21 08:31:33 1.2 +++ OpenXM_contrib2/asir2000/fft/fft_primes.c 2018/03/29 01:32:53 1.6 @@ -23,7 +23,7 @@ * shall be made on your publication or presentation in any form of the * results obtained by use of the SOFTWARE. * (4) In the event that you modify the SOFTWARE, you shall notify FLL by - * e-mail at risa-admin@flab.fujitsu.co.jp of the detailed specification + * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification * for such modification or the source code of the modified part of the * SOFTWARE. * @@ -45,12 +45,12 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/fft/fft_primes.c,v 1.1.1.1 1999/12/03 07:39:08 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/fft/fft_primes.c,v 1.5 2003/02/14 22:29:10 ohara Exp $ */ #include "dft.h" struct PrimesS Primes[NPrimes+1] = { -#if !USE_FLOAT +#if !defined(USE_FLOAT) {536813569,234750831,29,13}, {536752129,402492685,29,12}, {536743937,186329165,29,12}, @@ -13754,27 +13754,28 @@ static int blen_prod_fftprime[MAX_D+1] = 0 if not. */ -int fft_available(d1,n1,d2,n2) -int d1,n1,d2,n2; +int int_bits(int); + +int fft_available(int d1,int n1,int d2,int n2) { - int dmin,bound,dlen; + int dmin,bound,dlen; - dmin = d1>d2?d2:d1; - bound = n1+n2+int_bits(dmin)+1; - dlen = int_bits(d1+d2); - if ( dlen > MAX_D ) - return 0; - else if ( blen_prod_fftprime[dlen] <= bound ) - return 0; - else - return 1; + dmin = d1>d2?d2:d1; + bound = n1+n2+int_bits(dmin)+1; + dlen = int_bits(d1+d2); + if ( dlen > MAX_D ) + return 0; + else if ( blen_prod_fftprime[dlen] <= bound ) + return 0; + else + return 1; } void get_fft_prime(int index,int *p,int *d) { - if ( index < 0 || index >= NPrimes ) { - *p = 0; *d = 0; - } else { - *p = Primes[index].prime; *d = Primes[index].d; - } + if ( index < 0 || index >= NPrimes ) { + *p = 0; *d = 0; + } else { + *p = Primes[index].prime; *d = Primes[index].d; + } }