Contents


NAME

     fft - Fast Fourier transform subroutines

OVERVIEW

     The signal processing software in  Sun  Performance  Library
     includes  a  set of routines based on public domain packages
     FFTPACK  and  VFFPACK  that  computes   the   Fast   Fourier
     Transform.   These  routines are now being replaced by a new
     interface (Perflib interface).

MAPPING

     Below is a mapping of routines from  the  FFTPACK  interface
     and the new Perflib interface.  See individual man pages for
     more detail.

     FFTPACK interface       Perflib interface

     RFFTF (DFFTF)           SFFTC (DFFTZ)
     RFFTB (DFFTB)           CFFTS (ZFFTD)
     CFFTF (ZFFTF)           CFFTC (ZFFTZ)
     EZFFTF (DEZFFTF)        SFFTC (DFFTZ)
     EZFFTB (DEZFFTB)        CFFTS (ZFFTD)
     CFFTB (ZFFTB)           CFFTC (ZFFTZ)
     RFFT2F (DFFT2F)         SFFT2C (DFFT2Z)
     RFFT2B (DFFT2B)         CFFT2S (ZFFT2D)
     CFFT2F (ZFFT2F)         CFFT2C (ZFFT2Z)
     CFFT2B (ZFFT2B)         CFFT2C (ZFFT2Z)
     RFFT3F (DFFT3F)         SFFT3C (DFFT3Z)
     RFFT3B (DFFT3B)         CFFT3S (ZFFT3D)
     CFFT3B (ZFFT3B)         CFFT3C (ZFFT3Z)
     CFFT3F (ZFFT3F)         CFFT3C (ZFFT3Z)
     VCFFTF (VZFFTF)         CFFTCM (ZFFTZM)
     VCFFTB (VZFFTB)         CFFTCM (ZFFTZM)
     VRFFTF (VDFFTF)         SFFTCM (DFFTZM)
     VRFFTB (VDFFTB)         CFFTSM (ZFFTDM)
     RFFTI (DFFTI)           SFFTC (DFFTZ), CFFTS (ZFFTD)
     CFFTI (ZFFTI)           CFFTC (ZFFTZ)
     EZFFTI (DEZFFTI)        SFFTC (DFFTZ), CFFTS (ZFFTD)
     RFFT2I (DFFT2I)         SFFTC2 (DFFTZ2), CFFTS2 (ZFFTD2)
     RFFT3I (DFFT3I)         SFFTC3 (DFFTZ3), CFFTS3 (ZFFTD3)
     CFFT2I (ZFFT2I)         CFFTC2 (ZFFTZ2)
     CFFT3I (ZFFT3I)         CFFTC3 (ZFFTZ3)
     VCFFTI (VZFFTI)         CFFTCM (ZFFTZM)
     VRFFTI (VDFFTI)         SFFTCM (DFFTZM), CFFTSM (ZFFTDM)

NOTES

     Unlike the FFTPACK interface, the Perflib interface does not
     provide  separate  routines for initialization.  Computation
     and initialization can be selected by  an  argument  in  the
     calling  sequence  of  each routine.  Similar to the FFTPACK
     routines, the weight and factor tables need to  be  initial-
     ized  once  for  a  particular transform length.  Once these
     tables are initialized, they can be used repeatedly to  com-
     pute  the  forward  and inverse tranforms for different data
     sets until, of course, the transform length is changed.  The
     appropriate  transform  routine is then called to initialize
     the tables for the new length.

     The Perflib interface gives the user the option of computing
     the FFT in-place (input overwritten by transform results) or
     out-of-place (input unchanged) in every  routine.   When  an
     out-of-place  transform  is  requested, the input and output
     arrays must  not  overlap  in  memory.  In-place  transforms
     require  that there be perfect overlay between the input and
     output arrays.  That is, the arrays must begin at  the  same
     memory  location.  The routines assume (and therefore do not
     check) that these conditions are satisfied.  In some  cases,
     the  dimension(s) of the input and output arrays are related
     to each other.  Below is a summary of  requirements  of  the
     array  dimensions.   LDX1  and LDX are leading dimensions of
     the input arrays and LDY1 and LDY are leading dimensions  of
     the  output arrays.  LDX2 and LDY2 are the second dimensions
     of the input and output arrays, respectively.  N1 and N2 are
     the first and second actual dimensions of the problem.

     Routine name      in-place       out-of-place

     SFFTCM, DFFTZM    LDX = 2*LDY    LDX >= N1
                       LDY >= N1/2+1  LDY >= N1/2+1

     CFFTSM, ZFFTDM    LDX >= N1/2+1  LDX >= N1/2+1
                       LDY = 2*LDX    LDY >= N1

     CFFTCM, ZFFTZM    LDX >= N1      LDX >= N1
                       LDY = LDX      LDY >= N1

     SFFTC2, DFFTZ2    LDX = 2*LDY    LDX >= N1
                       LDY >= N1/2+1  LDY >= N1/2+1

     CFFTS2, ZFFTD2    LDX >= N1/2+1  LDX >= N1/2+1
                       LDY = 2*LDX    LDY >= 2*LDX; LDY is even

     CFFTC2, ZFFTZ2    LDX >= N1      LDX >= N1
                       LDY = LDX      LDY >= N1

     CFFTS3, ZFFTD3    LDX1 >= N1/2+1 LDX1 >= N1/2+1
                       LDX2 >= N2     LDX2 >= N2
                       LDY1 = 2*LDX1  LDY1  >=  2*LDX1;  LDY1  is
     even
                       LDY2 = LDX2    LDY2 >= N2

     CFFTC3, ZFFTZ3    LDX1 >= N1     LDX1 >= N1
                       LDX2 >= N2     LDX2 >= N2
                       LDY1 = LDX1    LDY1 >= N1
                       LDY2 = LDX2    LDY2 >= N2

     SFFTC3, DFFTZ3    LDX1 = 2*LDY1  LDX1 >= N1
                       LDX2 >= N2     LDX2 >= N2
                       LDY1 >= N1/2+1 LDY1 >= N1/2+1
                       LDY2 = LDX2    LDY2 >= N2

     In routines that compute transforms between complex and real
     data type such as SFFTC2 or CFFTS3 even though the transform
     length is N1, only (N1/2+1) complex data points  are  refer-
     enced   or   computed.    These  data  points  make  up  the
     positive-frequency half of  the  spectrum  of  the  Discrete
     Fourier  Transform.   The  remaining N1-(N1/2+1) data points
     can be easily derived since they are complex conjugates  and
     therefore are not stored or referenced.