scfftf(3S)

SCFFTF, SCFFTMF, SCFFT2DF, SCFFT3DF, DZFFTF, DZFFTMF, DZFFT2DF, DZFFT3DF - Deallocate memory tacked on to the table array during initialization

Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.15.

NAME
     SCFFTF, SCFFTMF, SCFFT2DF, SCFFT3DF, DZFFTF, DZFFTMF, DZFFT2DF, DZFFT3DF
     - Deallocate memory tacked on to the table array during initialization

SYNOPSIS
     Single precision complex -> Single precision complex

          Fortran:
               istatus = SCFFTF (n, table)
               istatus = SCFFTMF (n, table)
               istatus = SCFFT2DF (n1, n2, table)
               istatus = SCFFT3DF (n1, n2, n3, table)

          C/C++:
               #include <scsl_fft.h>
               istatus = scfftf (int n, float *table);
               istatus = scfftmf (int n, float *table);
               istatus = scfft2df (int n1, int n2, float *table);
               istatus = scfft3df (int n1, int n2, int n3, float *table);

     Double precision complex -> Double precision complex

          Fortran:
               istatus = DZFFTF (n, table)
               istatus = DZFFTMF (n, table)
               istatus = DZFFT2DF (n1, n2, table)
               istatus = DZFFT3DF (n1, n2, n3, table)

          C/C++:
               #include <scsl_fft.h>
               istatus = dzfftf (int n, double *table);
               istatus = dzfftmf (int n, double *table);
               istatus = dzfft2df (int n1, int n2, double *table);
               istatus = dzfft3df (int n1, int n2, int n3, double *table);

IMPLEMENTATION
     These routines are part of the SCSL Scientific Library and can be loaded
     using either the -lscs or the -lscs_mp option.  The -lscs_mp option
     directs the linker to use the multi-processor version of the library.

     When linking to SCSL with -lscs or -lscs_mp, the default integer size is
     4 bytes (32 bits). Another version of SCSL is available in which integers
     are 8 bytes (64 bits).  This version allows the user access to larger
     memory sizes and helps when porting legacy Cray codes.  It can be loaded
     by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
     only one of the two versions; 4-byte integer and 8-byte integer library
     calls cannot be mixed.

     The C and C++ prototypes shown above are appropriate for the 4-byte
     integer version of SCSL. When using the 8-byte integer version, the
     variables of type int become long long and the <scsl_fft_i8.h> header
     file should be included.
DESCRIPTION
     These routines deallocate memory added on to the table array during
     initialization if the first element of the isys array was set to 0 in the
     call to SCFFT(3S), SCFFTM(3S), SCFFT2D(3S), SCFFT3D(3S), DZFFT(3S),
     DZFFTM(3S), DZFFT2D(3S) or DZFFT3D(3S).  If the appropriate one of these
     deallocation routines is not used, that memory will leak, and repeated
     initializations using the same table array can exhaust memory.  If the
     first element of the isys array was set to 1 in the call to SCCFFT(3S),
     etc. (and this is the recommended value), there is no potential memory
     leak and these routines do not need to be called. If they are called,
     they will simply return 0.

     See the NOTES section of this man page for information about the
     interpretation of the data types described in the following arguments.

     These routines have the following arguments:

     istatus   Integer (result status). (output)
               0 indicates the memory was successfully freed.  Non-zero
               indicates that the memory was not freed because the transform
               size did not match the supplied table array.

     n         Integer.  (input)
               Size of the one dimensional transform (the number of values in
               the input array used to initialize table).  n >= 0.

     n1        Integer.   (input)
               Transform size in the first dimension.

     n2        Integer.   (input)
               Transform size in the second dimension.

     n3        Integer.   (input)
               Transform size in the third dimension.

     table     Array of the following dimensions. (input)
               SCFFTF: Single precision array of dimension (n + NFR).
               DZFFTF: Double precision array of dimension (n + NFR).
               SCFFTMF: Single precision array of dimension (n + NFR).
               DZFFTMF: Double precision array of dimension (n + NFR).
               SCFFT2DF: Single precision array of dimension (n1 + NFR) +
               (2*n2 + NF).
               DZFFT2DF: Double precision array of dimension (n1 + NFR) +
               (2*n2 + NF).
               SCFFT3DF: Single precision array of dimension (n1 + NFR) +
               (2*n2 + NF) + (2*n3 + NF).
               DZFFT3DF: Double precision array of dimension (n1 + NF) + (2*n2
               + NF) + (2*n3 + NF).
               Table of factors and roots of unity initialized by a call to
               the corresponding routine (SCFFT, SCFFTM, SCFFT2D, SCFFT3D,
               DZFFT, DZFFTM, DZFFT2D, DZFFT3D).  NF = 30 and NFR=15 if table
               was initialized using isys(0)=0.  NF=NFR=256 if table was
               initialized using isys(0)=1.

NOTES
     The following data types are described in this documentation:

          Term Used                     Data type

     Fortran:

          Array dimensioned 0..n-1      X(0:n-1)

          Array of dimensions (m,n)     X(m,n)

          Array of dimensions (m,n,p)   X(m,n,p)

          Integer                       INTEGER (INTEGER*8 for -lscs_i8[_mp])

          Single precision              REAL

          Double precision              DOUBLE PRECISION

          Single precision complex      COMPLEX

          Double precision complex      DOUBLE COMPLEX

     C/C++:

          Array dimensioned 0..n-1      x[n]

          Array of dimensions (m,n)     x[m*n] or x[n][m]

          Array of dimensions (m,n,p)   x[m*n*p] or x[p][n][m]

          Integer                       int (long long for -lscs_i8[_mp])

          Single precision              float

          Double precision              double

          Single precision complex      scsl_complex

          Double precision complex      scsl_zomplex

     C++ STL:

          Array dimensioned 0..n-1      x[n]

          Array of dimensions (m,n)     x[m*n] or x[n][m]

          Array of dimensions (m,n,p)   x[m*n*p] or x[p][n][m]

          Integer                       int (long long for -lscs_i8[_mp])

          Single precision              float

          Double precision              double

          Single precision complex      complex<float>

          Double precision complex      complex<double>

EXAMPLES
     Initialize the complex array table in preparation for doing an FFT of
     size 1024. Take the FFT of x and store the results in y. Deallocate extra
     memory tagged on to the table array.

          Fortran:

               !This example uses isys(0) = 0. The recommended value
               !    for current versions of SCSL is isys(0) = 1 which,
               !    if used, will eliminate the need to call SCFFTF.
               !
               REAL X(0:1023)
               COMPLEX Y(0:1024)
               REAL TABLE(1024 + 15)  ! +15 too small for isys(0) = 1
               REAL WORK(1024)
               INTEGER ISYS(0:0)
               INTEGER ISTATUS, CCFFTF
               ISYS(0) = 0
               CALL SCFFT(0, 1024, 0.0, DUMMY, DUMMY, TABLE, DUMMY, 0)
               CALL SCFFT(1, 1024, 1.0, X, Y, TABLE, WORK, 0)
               ISTATUS = SCFFTF(1024, TABLE)


          C/C++:

          /* This example uses isys[0] = 0. The recommended value
           * for current versions of SCSL is isys[0] = 1 which,
           * if used, will eliminate the need to call scfftf().
           */
          #include <scsl_fft.h>
          float x[1024];
          scsl_complex y[1025];
          float table[1024 + 15];  /* +15 too small for isys[0] = 1 */
          float work[1024];
          int isys[1];
          int istatus;
          isys[0] = 0;
          scfft(0, 1024, 0.0f, NULL, NULL, table, NULL, isys);
          scfft(1, 1024, 1.0f, X, Y, table, work, isys);
          istatus = scfftf(1024, table);

          C++ STL:

          // This example uses isys[0] = 0. The recommended value
          // for current versions of SCSL is isys[0] = 1 which,
          // if used, will eliminate the need to call scfftf().
          //
          #include <complex.h>
          #include <scsl_fft.h>
          float x[1024];
          complex<float> y[1025];
          float table[1024 + 15];  /* +15 too small for isys[0] = 1 */
          float work[2*1024];
          int isys[1];
          int istatus;
          isys[0] = 0;
          scfft(0, 1024, 0.0f, NULL, NULL, table, NULL, isys);
          scfft(1, 1024, 1.0f, X, Y, table, work, isys);
          istatus = scfftf(1024, table);


SEE ALSO
     INTRO_FFT(3S), INTRO_SCSL(3S)