CXML

sfft_2d, dfft_2d, cfft_2d, zfft_2d 


FORMAT

  Real transform: status = {S,D}FFT_2D (input_format, output_format,
  direction, in, out, ni, nj, lda, ni_stride, nj_stride)

  Complex transforms in complex format: status = {C,Z}FFT_2D (input_format,
  output_format, direction, in, out, ni, nj, lda, ni_stride, nj_stride)

  Complex transform in real data format: status = {C,Z}FFT_2D (input_format,
  output_format, direction, in_real, out_real, in_imag, out_imag, ni, nj,
  lda, ni_stride, nj_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 data, the type of data determines what other arguments are
       needed.  When both the input and output data are real, the complex
       routines 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 the
                      forward transform. Use 'B' or 'b' to specify the
                      inverse transform.

  in, out             real*4 | real*8 | complex*8 | complex*16
                      Both the arguments are two-dimensional arrays.  The
                      input and output arrays can be the same array. The IN
                      array contains the data to be transformed. The OUT
                      array  contains the transformed data.

  in_real, out_real, in_imag, 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.

  ni, nj              integer*4
                      Specifies the size of the first and second dimension of
                      data in the input array; ni > 0, nj > 0.  For SFFT_2D
                      and DFFT_2D, ni must be even.

  lda                 integer*4
                      Specifies the number of rows in the IN and OUT arrays;
                      lda >= ni.  For {S,D} routines, lda >= ni+2 when the
                      input format is 'R' and the output format is 'C' or the
                      input format is 'C' and the output format is 'R'.

  ni_stride, nj_stride
                      integer*4
                      Specifies the distance between consecutive elements in
                      a column and row in the IN and OUT arrays; ni_stride >=
                      1, nj_stride >= 1.

Description

  The _FFT_2D routines compute the fast forward or inverse Fourier transform
  of two-dimensional data in one step. The SFFT_2D and DFFT_2D functions
  perform the forward Fourier transform of a real sequence and store the
  result in either real or complex data format.  These functions also perform
  the inverse Fourier transform of a complex sequence into a real sequence.

  The CFFT_2D and ZFFT_2D functions perform Fourier transforms on a complex
  sequence. However, the argument list is different, depending on the data
  format in which the output data is stored.  See the CXML Reference Manual's
  chapter on "Using the Signal Processing Subprograms" for an explanation of
  real and complex data format.

Return Values

  0                  DXML_SUCCESS()

  4 (with real transforms only)
                     DXML_ILL_N_IS_ODD()

  8                  DXML_ILL_N_RANGE()

  11                 DXML_ILL_LDA()

  12                 DXML_INS_RES()

  13                 DXML_BAD_STRIDE()

  15                 DXML_BAD_DIRECTION_STRING()

  16                 DXML_BAD_FORMAT_STRING()

  18                 DXML_BAD_FORMAT_FOR_DIRECTION()

Examples

  INCLUDE 'CXMLDEF.FOR'
  INTEGER*4 N_I, N_J, STATUS, LDA
  REAL*8 A(1026,512), B(1026,513)
  N_I = 1024
  N_J = 512
  LDA = 1024
  STATUS = DFFT_2D('R','C','F',A,B,N_I,N_J,LDA,1,1)

  This FORTRAN code computes the forward, two-dimensional, real FFT of a
  1024x512 matrix A.  The result of the transform is stored in B in complex
  form. Note that the leading dimension of B is 1026 in order to hold the
  extra complex values (see section on data storage).  Note also that the
  input matrix A also requires a leading dimension of at least 1026.

  INCLUDE 'CXMLDEF.FOR'
  INTEGER*4 N_I, N_J, STATUS, LDA
  COMPLEX*8 A(1024,512), B(1024,512)
  N_I = 1024
  N_J = 512
  LDA = 1024
  STATUS = CFFT_2D('C','C','F',A,B,N_I,N_J,LDA,1,1)

  This FORTRAN code computes the forward, two-dimensional, complex FFT of a
  matrix A, of dimension 1024 by 512. The result of the transform is stored
  in B in complex form.

CXML Home Page

Index of CXML Routines