home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / lib / mathlib / libfft / fft1 / offt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  5.7 KB  |  150 lines

  1. /* *******************************************************************************
  2. *
  3. * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  4. * All Rights Reserved.
  5. *
  6. * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  7. * the contents of this file may not be disclosed to third parties, copied or
  8. * duplicated in any form, in whole or in part, without the prior written
  9. * permission of Silicon Graphics, Inc.
  10. *
  11. * RESTRICTED RIGHTS LEGEND:
  12. * Use, duplication or disclosure by the Government is subject to restrictions
  13. * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  14. * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  15. * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  16. * rights reserved under the Copyright Laws of the United States.
  17. *
  18. ******************************************************************************* */
  19. #include <math.h>
  20. #include <sys/types.h>
  21. #include <malloc.h>
  22. #include <stdlib.h>
  23.  
  24. #ifndef _SGI_FFT_
  25. #define    _SGI_FFT_
  26.  
  27. #define        FACTOR_SPACE    15
  28. /* *******************************************************
  29.     Complex structures definitions
  30. ******************************************************* */
  31.  
  32. typedef struct {
  33.     float re;
  34.     float im;
  35. } complex;
  36.  
  37. typedef struct {
  38.     double re;
  39.     double im;
  40. } zomplex;
  41.  
  42.  
  43. /* *******************************************************
  44.     C Functions prototypes
  45. ******************************************************* */
  46. /* *******************************************************
  47.     complex <---> complex FFTs
  48. ******************************************************* */
  49. complex *cfft1di( int n, complex *save);
  50. int cfft1d( int job, int n, complex *array, int inc, complex *save);
  51.  
  52. complex *cfft2di( int n1, int n2, complex *save);
  53. int cfft2d( int job, int n1, int n2, complex *array, int ld, complex *save);
  54.  
  55. complex *cfft3di( int n1, int n2, int n3, complex *save);
  56. int cfft3d( int job, int n1, int n2, int n3, complex *array, int ld1, int ld2, complex *save);
  57.  
  58.  
  59. /* *******************************************************
  60.     zomplex <---> zomplex FFTs
  61. ******************************************************* */
  62. zomplex *zfft1di( int n, zomplex *save);
  63. int zfft1d( int job, int n, zomplex *array, int inc, zomplex *save);
  64.  
  65. zomplex *zfft2di( int n1, int n2, zomplex *save);
  66. int zfft2d( int job, int n1, int n2, zomplex *array, int ld, zomplex *save);
  67.  
  68. zomplex *zfft3di( int n1, int n2, int n3, zomplex *save);
  69. int zfft3d( int job, int n1, int n2, int n3, zomplex *array, int ld1, int ld2, zomplex *save);
  70.  
  71.  
  72. /* *******************************************************
  73.     real <---> complex FFTs
  74. ******************************************************* */
  75. float *sfft1di( int n, float *save);
  76. int sfft1d( int job, int n, float *array, int inc, float *save);
  77.  
  78. float *sfft2di( int n1, int n2, void *save);
  79. int sfft2d( int job, int n1, int n2, void *array, int ld, void *save);
  80.  
  81. float *sfft3di( int n1, int n2, int n3, void *save);
  82. int sfft3d( int job, int n1, int n2, int n3, void *array, int ld1, int ld2, void *save);
  83.  
  84.  
  85. /* *******************************************************
  86.     double <---> zomplex FFTs
  87. ******************************************************* */
  88. double *dfft1di( int n, double *save);
  89. int dfft1d( int job, int n, double *array, int inc, double *save);
  90.  
  91. double *dfft2di( int n1, int n2, void *save);
  92. int dfft2d( int job, int n1, int n2, void *array, int ld, void *save);
  93.  
  94. double *dfft3di( int n1, int n2, int n3, void *save);
  95. int dfft3d( int job, int n1, int n2, int n3, void *array, int ld1, int ld2, void *save);
  96.  
  97.  
  98. /* *******************************************************
  99.     Fortran Subroutines prototypes
  100. ******************************************************* */
  101. /* *******************************************************
  102.     complex <---> complex FFTs
  103. ******************************************************* */
  104. void cfft1di_( int *n, complex *save);
  105. int cfft1d_( int *job, int *n, complex *array, int *inc, complex *save);
  106.  
  107. void cfft2di_( int *n1, int *n2, complex *save);
  108. void cfft2d_( int *job, int *n1, int *n2, complex *array, int *ld, complex *save);
  109.  
  110. void cfft3di_( int *n1, int *n2, int *n3, complex *save);
  111. void cfft3d_( int *job, int *n1, int *n2, int *n3, complex *array, int *ld1, int *ld2, complex *save);
  112.  
  113. /* ****************************
  114.     zomplex <---> zomplex FFTs
  115. **************************** */
  116. void zfft1di_( int *n, zomplex *save);
  117. void zfft1d_( int *job, int *n, zomplex *array, int *inc, zomplex *save);
  118.  
  119. void zfft2di_( int *n1, int *n2, zomplex *save);
  120. void zfft2d_( int *job, int *n1, int *n2, zomplex *array, int *ld, zomplex *save);
  121.  
  122. void zfft3di_( int *n1, int *n2, int *n3, zomplex *save);
  123. void zfft3d_( int *job, int *n1, int *n2, int *n3, zomplex *array, int *ld1, int *ld2, zomplex *save);
  124.  
  125. /* ********************************************************
  126.     real <---> complex FFTs
  127. ******************************************************** */
  128. void *sfft1di_( int *n, float *save);
  129. int *sfft1d_( int *job, int *n, float *array, int *inc, float *save);
  130.  
  131. void *sfft2di_( int *n1, int *n2, void *save);
  132. int *sfft2d_( int *job, int *n1, int *n2, void *array, int *ld, void *save);
  133.  
  134. void *sfft3di_( int *n1, int *n2, int *n3, void *save);
  135. int *sfft3d_( int *job, int *n1, int *n2, int *n3, void *array, int *ld1, int *ld2, void *save);
  136.  
  137. /* ********************************************************
  138.     double <---> zomplex FFTs
  139. ******************************************************** */
  140. void *dfft1di_( int *n, double *save);
  141. int *dfft1d_( int *job, int *n, double *array, int *inc, double *save);
  142.  
  143. void *dfft2di_( int *n1, int *n2, void *save);
  144. int *dfft2d_( int *job, int *n1, int *n2, void *array, int *ld, void *save);
  145.  
  146. void *dfft3di_( int *n1, int *n2, int *n3, void *save);
  147. int *dfft3d_( int *job, int *n1, int *n2, int *n3, void *array, int *ld1, int *ld2, void *save);
  148.  
  149. #endif
  150.