ZFFT2DX
Routine Documentation
ZFFT2DX (MODE,SCALE,LTRANS,INPL,M,N,X,INCX1, INCX2,Y,INCY1,INCY2,COMM,INFO)
|
SUBROUTINE |
The value of MODE on input determines the operation performed by
ZFFT2DX .
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
ZFFT2DX .
- MODE=1 : a backward (reverse) transform is performed.
Initializations are assumed to have been performed by a prior call to
ZFFT2DX .
- MODE=-2 : initializations and a forward transform are performed.
- MODE=2 : initializations and a backward transform are performed.
|
DOUBLE PRECISION SCALE
|
Input |
On input: SCALE is the scaling factor to apply to the output sequences
|
On input: if LTRANS is .TRUE. then a normal final transposition is performed internally to return transformed data consistent with the values for arguments INPL, INCX1, INCX2, INCY1 and INCY2. If LTRANS is .FALSE. then the final transposition is not
performed explicitly; the storage format on output is determined by whether the output data is stored contiguously or not - please see the output specifications for X and Y for details.
|
On input: if INPL is .TRUE. then X is overwritten by the output sequences; otherwise the output sequences are returned in Y.
|
On input: M is the first dimension of the 2D transform.
|
On input: N is the second dimension of the 2D transform.
|
COMPLEX*16 X(1+(M-1)*INCX1+(N-1)*INCX2)
|
Input/Output |
On input: X contains the M by N complex 2D data array to be transformed; the (ij)th element is stored in X(1+(i-1)*INCX1+(j-1)*INCX2).
On output: if INPL is .TRUE. then X contains the transformed data, either in the same locations as on input when LTRANS=.TRUE.; in locations X((i-1)*N+j) when LTRANS=.FALSE., INCX1=1 and INCX2=M; and otherwise in the same locations as on input. If INPL is .FALSE. X remains unchanged.
|
On input: INCX1 is the increment used to store, in X, successive elements in the first dimension (INCX1=1 for contiguous data).
Constraint: INCX1 > 0.
|
On input: INCX2 is the increment used to store, in X, successive elements in the second dimension (INCX2=M for contiguous data).
Constraint: INCX2 > 0.
|
COMPLEX*16 Y(1+(M-1)*INCY1+(N-1)*INCY2)
|
Output |
On output: if INPL is .FALSE. then Y contains the transformed data. If LTRANS=.TRUE. then the (ij)th data element is stored in Y(1+(i-1)*INCY1+(j-1)*INCY2); if LTRANS=.FALSE., INCY1=1 and INCY2=M then the (ij)th data element is stored in Y((i-1)*N+j); and otherwise the (ij)th element is stored in Y(1+(i-1)*INCY1+(j-1)*INCY2). If INPL is .TRUE. then Y is not referenced.
|
On input: INCY1 is the increment used to store successive elements in the first dimension in Y (INCY1=1 for contiguous data). If INPL is .TRUE. then INCY1 is not referenced.
Constraint: INCY1 > 0.
|
On input: INCY2 is the increment used to store successive elements in the second dimension in Y (INCY2=M for contiguous data). If INPL is .TRUE. then INCY2 is not referenced.
Constraint: INCY2 > 0.
|
COMPLEX*16 COMM(M*N+3*M+3*N+200)
|
Input/Output |
COMM is a communication array. Some portions of the array are used to store
initializations for subsequent calls with the same dimensions M and N.
The remainder is used as temporary store.
|
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 2D FFT is performed unscaled, without final transpose
C and out-of-place on data stored in array X and output to Y.
C Manipulations are stored in vector Y which is then transformed
C back, with scaling, into the first M rows of X.
C
COMPLEX *16 X(LDX,N), Y(M*N)
SCALE = 1.0D0
INPL = .FALSE.
LTRANS = .FALSE.
CALL ZFFT2DX(0,SCALE,LTRANS,INPL,M,N,X,1,LDX,Y,1,M,COMM,INFO)
CALL ZFFT2DX(-1,SCALE,LTRANS,INPL,M,N,X,1,LDX,Y,1,M,COMM,INFO)
IY = 1
DO 20 I = M
DO 10 J = 1, N
Y(IY) = 0.5D0*Y(IY)*EXP(0.001D0*(I+J-2))
IY = IY + 1
10 CONTINUE
20 CONTINUE
SCALE = 1.0D0/DBLE(M*N)
CALL ZFFT2DX(1,SCALE,LTRANS,INPL,N,M,Y,1,N,X,1,LDX,COMM,INFO)