Previous: ZFFT1DX, Up: 1D FFT


CFFT1DX Routine Documentation
— SUBROUTINE: CFFT1DX (MODE,SCALE,INPL,N,X,INCX,Y,INCY,COMM,
INFO
)
— Input: INTEGER MODE

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 using a default plan; 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 : (default) initializations and a forward transform are performed.
  • MODE=2 : (default) initializations and a backward transform are performed.
  • MODE=100 : similar to MODE=0; only initializations (specific to the value of N) are performed, but these are based on a plan that is first generated by timing a subset of all possible plans and choosing the quickest (i.e. the FFT computation was timed as fastest based on the chosen plan). The plan generation phase may take a significant amount of time depending on the value of N.

— Input: REAL SCALE

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

— Input: LOGICAL INPL

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

— Input: INTEGER N

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

— Input/Output: COMPLEX X(1+(N-1)*INCX)

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.

— Input: INTEGER INCX

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

— Output: COMPLEX Y(1+(N-1)*INCY)

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.

— Input: INTEGER INCY

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.

— Input/Output: COMPLEX COMM(5*N+100)

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.

— Output: INTEGER INFO

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 initialization. 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)