Node:CFFT1DX, Previous:ZFFT1DX, Up:1D FFT



CFFT1DX Routine Documentation

CFFT1DX (MODE,SCALE,INPL,N,X,INCX,Y,INCY,COMM,
INFO)
SUBROUTINE
INTEGER MODE Input
The value of MODE on input determines the operation performed by CFFT1DX.
On input:
  • MODE=0 : only initializations (specific to the value of N) are performed; this is usually followed by calls to the same routine with MODE=-1 or 1.
  • MODE=-1 : a forward transform is performed. Initializations are assumed to have been performed by a prior call to CFFT1DX.
  • MODE=1 : a backward (reverse) transform is performed. Initializations are assumed to have been performed by a prior call to CFFT1DX.
  • MODE=-2 : initializations and a forward transform are performed.
  • MODE=2 : initializations and a backward transform are performed.

REAL SCALE Input
On input: SCALE is the scaling factor to apply to the output sequence

LOGICAL INPL Input
On input: if INPL is .TRUE. then X is overwritten by the output sequence; otherwise the output sequence is returned in Y.

INTEGER N Input
On input: N is the number of elements to be transformed

COMPLEX X(1+(N-1)*INCX) Input/Output
On input: X contains the complex sequence of length N to be transformed, with the ith element stored in X(1+(i-1)*INCX).
On output: if INPL is .TRUE. then X contains the transformed sequence in the same locations as on input; otherwise X remains unchanged.

INTEGER INCX Input
On input: INCX is the increment used to store successive elements of a sequence in X.
Constraint: INCX > 0.

COMPLEX Y(1+(N-1)*INCY) Output
On output: if INPL is .FALSE. then Y contains the transformed sequence, with the ith element stored in Y(1+(i-1)*INCY); otherwise Y is not referenced.

INTEGER INCY Input
On input: INCY is the increment used to store successive elements of a sequence in Y. If INPL is .TRUE. then INCY is not referenced.
Constraint: INCY > 0.

COMPLEX COMM(5*N+100) Input/Output
COMM is a communication array. Some portions of the array are used to store initializations for subsequent calls with the same sequence length N. The remainder is used as temporary store.

INTEGER INFO Output
On output: INFO is an error indicator. On successful exit, INFO contains 0. If INFO = -i on exit, the i-th argument had an illegal value.

     Example:
     C     Forward FFTs are performed unscaled and in-place on contiguous
     C     vectors X and Y following initialisation. Manipulations on
     C     resultant Fourier coefficients are stored in X which is then
     C     transformed back.
     C
             SCALE = 1.0
             INPL = .TRUE.
             CALL CFFT1DX(0,SCALE,INPL,N,X,1,DUM,1,COMM,INFO)
             CALL CFFT1DX(-1,SCALE,INPL,N,X,1,DUM,1,COMM,INFO)
             CALL CFFT1DX(-1,SCALE,INPL,N,Y,1,DUM,1,COMM,INFO)
             DO 10 I = 1, N
                X(I) = X(I)*CONJG(Y(I))/REAL(N)
        10   CONTINUE
             CALL CFFT1DX(1,SCALE,INPL,N,X,1,DUM,1,COMM,INFO)