CXML
sfft_grp, dfft_grp, cfft_grp, zfft_grp
Group fast fourier transform in
one dimension
FORMAT
Real transform: status = {S,D}FFT_GRP (input_format, output_format,
direction, in, out, n, grp_size, lda, stride, grp_stride)
Complex transform in complex data format: status = {C,Z}FFT_GRP
(input_format, output_format, direction, in, out, n, grp_size, lda, stride,
grp_stride)
Complex transform real data format: status = {C,Z}FFT_GRP (input_format,
output_format, direction, in_real, in_imag, out_real, out_imag, n,
grp_size, lda, stride, grp_stride)
Arguments
input_format, output_format
character*(*)
Identifies the data type of the input and the format to
be used to store the data, regardless of the data type.
For example, a complex sequence can be stored in real
format.
The character 'R' specifies the format as real; the
character 'C' specifies the format as complex. As
convenient, use either upper- or lowercase characters,
and either spell out or abbreviate the word.
The following table shows the valid values:
Subprogram Input Format Output Format Direction
{S,D} 'R' 'C' 'F'
'C' 'R' 'B'
'R' 'R' 'F' or 'B'
{C,Z} 'R' 'R' 'F' or 'B'
'C' 'C' 'F' or 'B'
For complex transforms, the type of data determines what other
arguments are needed. When both the input and output data are real,
the complex functions store the data as separate arrays for imaginary
and real data so additional arguments are needed.
direction character*(*)
Specifies the operation as either the forward or
inverse transform. Use 'F' or 'f' to specify forward
transform. Use 'B' or 'b' to specify the inverse
transform.
in, out real*4 | real*8 | complex*8 | complex*16
Both arguments are two-dimensional arrays. The IN
array contains the data to be transformed. The OUT
array contains the transformed data. The IN and OUT
arrays can be the same array.
in_real, in_imag, out_real, out_imag
real*4 | real*8
Use these arguments when performing a complex transform
on real data format and storing the result in a real
data format.
n integer*4
Specifies the number of elements in the column within
each one-dimensional data array; n > 0. For SFFT_GRP
and DFFT_GRP, n must be even.
grp_size integer*4
Specifies the number of one-dimensional data arrays;
grp_size > 0.
lda integer*4
Specifies the number of rows in two-dimensional data
arrays; lda >= grp_size. Using lda = grp_size + {3 or
5} can sometimes achieve better performance by avoiding
cache thrashing.
stride integer*4
Specifies the distance between columns of active data
arrays; stride >= 1. stride permits columns of IN and
OUT arrays to be skipped when they are not part of the
group.
grp_stride integer*4
Specifies the distance between consecutive elements in
a row in the IN and OUT arrays; grp_stride >= 1.
grp_stride permits rows of IN and OUT arrays to be
skipped when they are not part of the group.
Description
The _FFT_GRP computes the fast forward or inverse Fourier transform on a
group of one-dimensional data arrays. The transform is performed on the
first row of elements of one-dimensional data arrays within the group. Data
array can be skipped by setting the stride parameter. The transform then
goes to the next row of elements. Similarly, rows of elements can be
skipped by setting the grp_stride parameter. _FFT_GRP contrasts with the
_FFT in that _FFT performs a transform on each element of a data array
before going to the next data array. Although _FFT_GRP gives the same
result as _FFT, _FFT_GRP is more efficient at completing the transform.
Return Values
0 DXML_SUCCESS()
4 (real transforms only)
DXML_ILL_N_IS_ODD()
8 DXML_ILL_N_RANGE()
12 DXML_INS_RES()
13 DXML_BAD_STRIDE()
15 DXML_BAD_DIRECTION_STRING()
16 DXML_BAD_FORMAT_STRING()
18 (real transforms only)
DXML_BAD_FORMAT_FOR_DIRECTION()
Example
INCLUDE 'CXMLDEF.FOR'
INTEGER*4 N,GRP_SIZE
REAL*8 A(100,514),B(100,514)
N=512
LDA=100
GRP_SIZE=100
STATUS=DFFT_GRP('R','C','F',A,B,N,GRP_SIZE,LDA,1,1)
This FORTRAN code computes a set of 100 FFT of size 512. The results of the
transforms are stored in B in complex format. Note that the second
dimension of A and B is 514 to hold the extra complex values (see the
section on data storage).
CXML Home Page Index of CXML Routines