ccfftf(3S)

CCFFTF, CCFFTMF, CCFFTMRF, CCFFT2DF, CCFFT3DF, ZZFFTF, ZZFFTMF, ZZFFTMRF, ZZFFT2DF, ZZFFT3DF - Deallocate memory tacked on to the table array during initialization

As shipped in IRIX 6.5.30. Added in IRIX 6.5.15.

NAME
     CCFFTF, CCFFTMF, CCFFTMRF, CCFFT2DF, CCFFT3DF, ZZFFTF, ZZFFTMF, ZZFFTMRF,
     ZZFFT2DF, ZZFFT3DF - Deallocate memory tacked on to the table array
     during initialization

SYNOPSIS
     Single precision complex -> Single precision complex

          Fortran:
               istatus = CCFFTF (n, table)
               istatus = CCFFTMF (n, table)
               istatus = CCFFTMRF (n, table)
               istatus = CCFFT2DF (n1, n2, table)
               istatus = CCFFT3DF (n1, n2, n3, table)

          C/C++:
               #include <scsl_fft.h>
               istatus = ccfftf (int n, float *table);
               istatus = ccfftmf (int n, float *table);
               istatus = ccfftmrf (int n, float *table);
               istatus = ccfft2df (int n1, int n2, float *table);
               istatus = ccfft3df (int n1, int n2, int n3, float *table);

     Double precision complex -> Double precision complex

          Fortran:
               istatus = ZZFFTF (n, table)
               istatus = ZZFFTMF (n, table)
               istatus = ZZFFTMRF (n, table)
               istatus = ZZFFT2DF (n1, n2, table)
               istatus = ZZFFT3DF (n1, n2, n3, table)

          C/C++:
               #include <scsl_fft.h>
               istatus = zzfftf (int n, double *table);
               istatus = zzfftmf (int n, double *table);
               istatus = zzfftmrf (int n, double *table);
               istatus = zzfft2df (int n1, int n2, double *table);
               istatus = zzfft3df (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 CCFFT(3S), CCFFTM(3S), CCFFTMR(3S), CCFFT2D(3S), CCFFT3D(3S),
     ZZFFT(3S), ZZFFTM(3S), ZZFFTMR(3S), ZZFFT2D(3S) or ZZFFT3D(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 CCFFT(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)
               CCFFTF: Single precision array of dimension (2*n + NF).
               ZZFFTF: Double precision array of dimension (2*n + NF).
               CCFFTMF: Single precision array of dimension (2*n + NF).
               ZZFFTMF: Double precision array of dimension (2*n + NF).
               CCFFTMRF: Single precision array of dimension (2*n + NF).
               ZZFFTMRF: Double precision array of dimension (2*n + NF).
               CCFFT2DF: Single precision array of dimension (2*n1 + NF) +
               (2*n2 + NF).
               ZZFFT2DF: Double precision array of dimension (2*n1 + NF) +
               (2*n2 + NF).
               CCFFT3DF: Single precision array of dimension (2*n1 + NF) +
               (2*n2 + NF) + (2*n3 + NF).
               ZZFFT3DF: Double precision array of dimension (2*n1 + NF) +
               (2*n2 + NF) + (2*n3 + NF).
               Table of factors and roots of unity initialized by a call to
               the corresponding routine (CCFFT, CCFFTM, CCFFTMR, CCFFT2D,
               CCFFT3D, ZZFFT, ZZFFTM, ZZFFTMR, ZZFFT2D, ZZFFT3D).  NF = 30 if
               table was initialized using isys(0)=0.  NF=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

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 CCFFTF.
               !
               COMPLEX X(0:1023), Y(0:1023)
               REAL TABLE(2*1024 + 30)  ! +30 too small for isys(0) = 1
               REAL WORK(2*1024)
               INTEGER ISYS(0:0)
               INTEGER ISTATUS, CCFFTF
               ISYS(0) = 0
               CALL CCFFT(0, 1024, 0.0, DUMMY, DUMMY, TABLE, DUMMY, 0)
               CALL CCFFT(1, 1024, 1.0, X, Y, TABLE, WORK, 0)
               ISTATUS = CCFFTF(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 ccfftf().
           */
          #include <scsl_fft.h>
          scsl_complex x[1024], y[1024];
          float table[2*1024 + 30];  /* +30 too small for isys[0] = 1*/
          float work[2*1024];
          int isys[1];
          int istatus;
          isys[0] = 0;
          ccfft(0, 1024, 0.0f, NULL, NULL, table, NULL, isys);
          ccfft(1, 1024, 1.0f, X, Y, table, work, isys);
          istatus = ccfftf(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 ccfftf().
               //
               #include <complex.h>
               #include <scsl_fft.h>
               complex<float> x[1024], y[1024];
               float table[2*1024 + 30];  // +30 too small for isys[0] = 1
               float work[2*1024];
               int isys[1];
               int istatus;
               isys[0] = 0;
               ccfft(0, 1024, 0.0f, NULL, NULL, table, NULL, isys);
               ccfft(1, 1024, 1.0f, X, Y, table, work, isys);
               istatus = ccfftf(1024, table);


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