scfft2du,dzfft2du(3F) scfft2du,dzfft2du(3F)
scfft2du, dzfft2du - 2D, Real to Complex, Direct Fast Fourier Transforms.
Fortran :
subroutine scfft2du( sign, n1, n2, array, lda, coef )
integer sign, n1, n2, lda
real array(lda,n2), coef((n1+15)+2*(n2+15))
subroutine dzfft2du( sign, n1, n2, array, lda, coef )
integer sign, n1, n2, lda
real*8 array(lda,n2), coef((n1+15)+2*(n2+15))
C :
#include <fft.h>
int scfft2du ( int sign, int n1, int n2, float *array,
int lda, float *coef);
int dzfft2du ( int sign, int n1, int n2, double *array,
int lda, double *coef);
scfft2du and dzfft2du compute in place the complex Fourier transform of
real 2D sequence of size N1 x N2. The value F{k,l} of the transform of
the 2D sequence f{i,j} is equal to:
F{k,l} = Sum ( W1^(i*k) * W2^(j*l) * f{i,j} ),
for i =0,...,(N1-1), j=0,...,(n2-1)
W1 = exp( (Sign*2*sqrt(-1)*PI) / N1 )
W2 = exp( (Sign*2*sqrt(-1)*PI) / N2 )
It is assumed that the (N1 x N2) 2D sequence is stored along dimension
N1. So the index {i+1,j} has an offset of 1 element with respect to
{i,j}, and {i,j+1} an offset of lda elements with respect to {i,j}.
NOTE : lda must be larger (or equal) to 2*((N1+2)/2).
The real-to-complex Direct 2D Fourier transform is computed with a rowcolumn
approach.
- First, N2 FFTs real-to-complex of size N1 are evaluated, stride = 1
and leading_dimension=lda.
- then, N1 FFTs complex-to-complex of size N2 are preformed,
stride=lda/2, and leading_dimension=1.
As the input sequence has real values, only half of the results are
computed since the sample {(N1-k),l} of the real-to-complex transform
would be the conjugate of the sample {k,l}.
However, some extra space is necessary, and the relation
(lda>=2*((N1+2)/2)) must hold.
Page 1
scfft2du,dzfft2du(3F) scfft2du,dzfft2du(3F)
SIGN Integer specifying which sign to be used for the expression of W
(see above) - must be either +1 or -1.
Unchanged on exit.
N1 Integer, the first dimension size of the 2D sequence.
Unchanged on exit.
N2 Integer, the second dimension size of the 2D sequence.
Unchanged on exit.
ARRAY Array containing the samples of the 2D sequence to be transformed.
On input, the element {i,j} of the sequence is stored as A(i,j) in
Fortran , and A[i+j*lda] in C.
On exit, the array is overwritten by its transform.
LDA Integer, leading dimension: increment between the samples of two
consecutive sub-sequences (e.g between {i,j+1} and {i,j} ).
Unchanged on exit.
COEFF Array of at least ( (N1+15)+2*(N2+15) ) elements. On entry it
contains the Sines/Cosines and factorization of N1 and N2. COEFF needs to
be initialized with a call to scfft2dui or dzfft2dui. Unchanged on exit.
Example of Calling Sequence
2D FFTs computed on a 64*1024 sequence of real values. The elements of
each sequence are stored with increment (stride) 1, and the offset
between the first element of two succesive sequence (leading dimension)
is 1026.
Note : 1026 >= 1024+2 .
Fortran
real array(0:1026-1,0:64-1), coeff(1024+15 + 2*(64+15))
call scfft2dui( 1024, 64, coeff)
call scfft2du( -1, 1024, 64, array, 1026, coeff)
C
#include <fft.h>
float array[64*1026], *coeff;
coeff = scfft2dui( 1024, 64, NULL);
scfft2du( -1, 1024, 64, array, 1026, coeff);
fft, scfft2dui, dzfft2dui, scfft1du, dzfft1du, csfft2du, zdfft2du
PPPPaaaaggggeeee 2222 [ Back ]
|