1 subroutine cfftmi ( n, wsave, lensav, ier )
3 !*****************************************************************************80
5 !! CFFTMI: initialization for CFFTMB and CFFTMF.
9 ! CFFTMI initializes array WSAVE for use in its companion routines
10 ! CFFTMB and CFFTMF. CFFTMI must be called before the first call
11 ! to CFFTMB or CFFTMF, and after whenever the value of integer N changes.
14 ! Copyright (C) 1995-2004, Scientific Computing Division,
15 ! University Corporation for Atmospheric Research
29 ! Vectorizing the Fast Fourier Transforms,
30 ! in Parallel Computations,
31 ! edited by G. Rodrigue,
32 ! Academic Press, 1982.
35 ! Fast Fourier Transform Algorithms for Vector Computers,
36 ! Parallel Computing, pages 45-63, 1984.
40 ! Input, integer ( kind = 4 ) N, the length of each sequence to be
41 ! transformed. The transform is most efficient when N is a product of
44 ! Input, integer ( kind = 4 ) LENSAV, the dimension of the WSAVE array.
45 ! LENSAV must be at least 2*N + INT(LOG(REAL(N))) + 4.
47 ! Output, real ( kind = 4 ) WSAVE(LENSAV), containing the prime factors
48 ! of N and also containing certain trigonometric values which will be used in
49 ! routines CFFTMB or CFFTMF.
51 ! Output, integer ( kind = 4 ) IER, error flag.
53 ! 2, input parameter LENSAV not big enough.
57 integer ( kind = 4 ) lensav
59 integer ( kind = 4 ) ier
60 integer ( kind = 4 ) iw1
61 integer ( kind = 4 ) n
62 real ( kind = 4 ) wsave(lensav)
66 if ( lensav < 2 * n + int ( log ( real ( n, kind = 4 ) ) ) + 4 ) then
68 call xerfft ( 'cfftmi ', 3 )
77 call r4_mcfti1 ( n, wsave, wsave(iw1), wsave(iw1+1) )