CRCFTS,ZRCFTS(3) MathKeisan FFT routine CRCFTS,ZRCFTS(3)
NAME
crcfts, zrcfts - simultaneous real-to-complex 1-dimensional FFT - full
storage mode. (OpenMP Parallel Support).
SYNOPSIS
libfft.a
INTEGER l, incl, n, incn, iopt, ier
COMPLEX z(lenz)
CALL CRCFTS (z, l, incl, n, incn, iopt, ier)
INTEGER l, incl, n, incn, iopt, ier
COMPLEX(kind=8) z(lenz)
CALL ZRCFTS (z, l, incl, n, incn, iopt, ier)
libfft_64.a
INTEGER(kind=8) l, incl, n, incn, iopt, ier
COMPLEX(kind=8) z(lenz)
CALL CRCFTS (z, l, incl, n, incn, iopt, ier)
INTEGER(kind=8) l, incl, n, incn, iopt, ier
COMPLEX(kind=8) z(lenz)
CALL ZRCFTS (z, l, incl, n, incn, iopt, ier)
DESCRIPTION
Given a number of one-dimensional data sets, these subprograms simulta-
neously compute all of their one-dimensional forward real-to-complex or
inverse complex-to-real discrete Fourier transforms using a mixed-radix
fast Fourier transform (FFT) algorithm optimized for real input or out-
put.
A pair of companion subprograms, SRCFTS and DRCFTS, performs the same
operation, but in a space-conserving manner.
Other subprograms are more suited for computing just one real-to-com-
plex or complex-to-real transform.
Set the OpenMP environmental variable OMP_NUM_THREADS to the number of
threads you would like to use.
ARGUMENTS
Input
z Array containing n data sets, each consisting of l data points,
to be transformed. Typically, z is a two- or three-dimensional
array with each set of data being a one-dimensional array sec-
tion. Refer to ``Notes'' for suggested usages. Treating z as a
one-dimensional array, results in
lenz = (l-1)*incl + (n-1)*incn + 1.
The i-th data point of the j-th data set, 1 <= i <= l, 1 <= j <=
n, is stored in
z((i-1)*incl + (j-1)*incn + 1).
For a forward real-to-complex transform, only real parts of z
are used as input. For an inverse complex-to-real transform,
only the first l/2+1 complex data points of each data set are
used as input.
l Number of data points in each data set (l>0).
incl Storage increment between successive elements of the same data
set, incl > 0. Use incl = 1 if each data set is stored contigu-
ously in array z.
n The number of data sets, n > 0.
incn Storage increment between corresponding data points of succes-
sive data sets, incn > 0.
iopt Option flag:
iopt >= 0 Compute forward real-to-complex transform.
iopt < 0 Compute inverse complex-to-real transform.
Output
z The transformed data replaces the input if ier = 0 is returned.
Unchanged if ier < 0. For a forward real-to-complex transform,
each transformed data set satisfies the conjugate-symmetry con-
dition. For an inverse complex-to-real transform, the real
result is stored in the real parts of z; the imaginary parts of
z are set to zero.
ier Status response:
ier = 0 Normal return - transform successful.
ier = -1 l <= 0
ier = -2 incl <= 0
ier = -3 n <= 0
ier = -4 incn <= 0
ier = -5 l, incl, n, and incn are incompatible.
Refer to ``Notes.''
NOTES
Typically, z is a two- or three-dimensional array with each set of data
being a one-dimensional section of the array, that is, all but one sub-
script is constant within a data set. If z is a two-dimensional array
of dimension ldz by mdz, and if the data sets are stored in the columns
of z, then l <= ldz, n <= mdz, incl = 1, and incn = ldz. For example,
use
CALL CRCFTS (z, l, 1, n, ldz, iopt, ier)
If z is a two-dimensional array as above and the data sets are stored
in the rows of z, then l <= mdz, n <= ldz, incl = ldz, and incn = 1.
For example, use
CALL CRCFTS (z, l, ldz, n, 1, iopt, ier)
If z is a three-dimensional array of dimension ldz by mdz by ndz, then
incl and incn will usually be 1, ldz, or ldz*mdz, depending on which of
the subscripts of the three-dimensional array varies within a data set,
which subscript varies between data sets, and which remains constant.
Specifically, if the subscript that varies within a data set is the
1st subscript, use incl = 1.
2nd subscript, use incl = ldz.
3rd subscript, use incl = ldz*mdz.
Similarly, if the subscript that varies between data sets is the
1st subscript, use incn = 1.
2nd subscript, use incn = ldz.
3rd subscript, use incn = ldz*mdz.
l, incl, n, and incn must be such that no two points of any data sets
occupy the same element of z. These subprograms detect this situation
and return ier = -5 if
incl < n * gcd(incl,incn)
and
incn < l * gcd(incl,incn),
where gcd (.,.) is the greatest common divisor.
MLIB routine CRCFTS,ZRCFTS(3)