SRCFTS,DRCFTS(3) MathKeisan FFT routine SRCFTS,DRCFTS(3)
NAME
srcfts, drcfts - simultaneous real-to-complex 1-dimensional FFT.
(OpenMP Parallel Support).
SYNOPSIS
libfft.a
INTEGER l, incl, n, incn, iopt, ier
REAL x(lenx)
CALL SRCFTS (x, l, incl, n, incn, iopt, ier)
INTEGER l, incl, n, incn, iopt, ier
REAL(kind=8) x(lenx)
CALL DRCFTS (x, l, incl, n, incn, iopt, ier)
libfft_64.a
INTEGER(kind=8) l, incl, n, incn, iopt, ier
REAL(kind=8) x(lenx)
CALL SRCFTS (x, l, incl, n, incn, iopt, ier)
INTEGER(kind=8) l, incl, n, incn, iopt, ier
REAL(kind=8) x(lenx)
CALL DRCFTS (x, l, incl, n, incn, iopt, ier)
DESCRIPTION
Given a number of one-dimensional real data sets, these subprograms
compute the nonredundant portions of all of their one-dimensional for-
ward real-to-complex discrete Fourier transforms using a mixed-radix
fast Fourier transform (FFT) algorithm optimized for real input.
Alternatively, given the nonredundant parts of a number of conjugate-
symmetric one-dimensional complex data sets, these subprograms compute
the inverse complex-to-real discrete Fourier transform using a mixed-
radix FFT algorithm optimized for real output.
A pair of companion subprograms, CRCFTS and ZRCFTS, performs similar
operations, but with the real or complex data presented in a complex
array. The companion subprograms require more storage than the ones
described here.
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
x Array containing n one-dimensional data sets, each consisting of
l real data points or the first l/2+1 complex data points of a
conjugate-symmetric complex data set of length l, to be trans-
formed. Typically, x is a two- or three-dimensional array with
each set of data being a one-dimensional array section. Refer
to ``Notes'' for suggested usages. Treating x as a one-dimen-
sional array, results in
lenx = (l+1)*incl + (n-1)*incn + 1.
For a forward real-to-complex transform, the i-th real data
point of the j-th data set, 1 <= i <= l, 1 <= j <= n, is stored
in
x((i-1)*incl + (j-1)*incn + 1).
For an inverse complex-to-real transform, the real part of the
i-th data point of the j-th data set, 1 <= i <= l/2+1, 1 <= j <=
n, is stored in
x((2*i-2)*incl + (j-1)*incn + 1)
and the imaginary part is stored in
x((2*i-1)*incl + (j-1)*incn + 1),
respectively.
l Number of data points in each complete data set (l > 0).
incl Storage increment between successive elements of the same data
set, incl > 0. incl = 1 means that the data points of a real
data set are stored contiguously in array x, or that the real
and imaginary parts of the data points of a complex data set are
stored alternatingly in contiguous elements of x.
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
x The transformed data replaces the input if ier = 0 is returned.
Unchanged if ier < 0. For a forward real-to-complex transform,
the real part of the i-th output point of the j-th data set, 1
<= i <= l/2+1, 1 <= j <= n, is stored in
x((2*i-2)*incl + (j-1)*incn + 1)
and the imaginary part is stored in
x((2*i-1)*incl + (j-1)*incn + 1),
respectively. If needed, the remaining (l/2-1)*n complex output
values may be formed by using the conjugate-symmetry condition.
For an inverse complex-to-real transform, the i-th real output
point of the j-th data set, 1 <= i <= l, 1 <= j <= n, is stored
in
x((i-1)*incl + (j-1)*incn + 1).
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, x will be a two- or three-dimensional array with each set of
data being a one-dimensional section of the array, i.e., all but one
subscript will be constant within a data set. If x is a two-dimen-
sional array of dimension ldx by mdx, and if the data sets are stored
in the columns of x, then l+2 <= ldx, n <= mdx, incl = 1, and incn =
ldx. For example, use
CALL SRCFTS (x, l, 1, n, ldxy, iopt, ier)
If x is a two-dimensional array as above and the data sets are stored
in the rows of x, then l+2 <= mdx, n <= ldx, incl = ldx, and incn = 1.
For example, use
CALL SRCFTS (x, l, ldxy, n, 1, iopt, ier)
If x is a three-dimensional array of dimension ldx by mdx by ndx, then
incl and incn will usually be 1, ldx, or ldx*mdx, 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 = ldx.
3rd subscript, use incl = ldx*mdx.
Similarly, if the subscript that varies between data sets is the
1st subscript, use incn = 1.
2nd subscript, use incn = ldx.
3rd subscript, use incn = ldx*mdx.
l, incl, n, and incn must be such that no two points of any data sets
occupy the same elements of x. These subprograms detect this situation
and return ier = -5 if
incl < n * gcd(incl,incn)
and
incn < (l+2) * gcd(incl,incn),
where gcd (.,.) is the greatest common divisor.
MLIB routine SRCFTS,DRCFTS(3)