cfft2i

Return to Main Contents

NAME

CFFT2I - initialization routine for CFFT2B, CFFT2F

SYNOPSIS

 SUBROUTINE CFFT2I (L, M, WSAVE, LENSAV, IER)

 INTEGER    L, M, LENSAV, IER
 REAL       WSAVE(LENSAV)

DESCRIPTION

 FFTPACK 5.0 routine CFFT2I initializes real array WSAVE for use
 in its companion routines CFFT2F and CFFT2B for computing two-
 dimensional fast Fourier transforms of complex data.  Prime 
 factorizations of L and M, together with tabulations of the 
 trigonometric functions, are computed and stored in array WSAVE.
 
 Input Arguments
 
 L       Integer number of elements to be transformed in the first 
         dimension.  The transform is most efficient when L is a 
         product of small primes.


 M       Integer number of elements to be transformed in the second 
         dimension.  The transform is most efficient when M is a 
         product of small primes.
 
 LENSAV  Integer dimension of WSAVE array.  LENSAV must be at least 
         2*(L+M) + INT(LOG(REAL(L))) + INT(LOG(REAL(M))) + 8.


 Output Arguments
 
 WSAVE   Real work array with dimension LENSAV, containing the
         prime factors of L and M, and also containing certain 
         trigonometric values which will be used in routines 
         CFFT2B or CFFT2F.


 WSAVE   Real work array with dimension LENSAV.  The WSAVE array 
         must be initialized with a call to subroutine CFFT2I before 
         the first call to CFFT2B or CFFT2F, and thereafter whenever
         the values of L, M or the contents of array WSAVE change.  
         Using different WSAVE arrays for different transform lengths
         or types in the same program may reduce computation costs 
         because the array contents can be re-used.


 IER     Integer error return
         =  0 successful exit
         =  2 input parameter LENSAV not big enough
         = 20 input error returned by lower level routine