cffti.f 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. *DECK CFFTI
  2. SUBROUTINE CFFTI (N, WSAVE)
  3. C***BEGIN PROLOGUE CFFTI
  4. C***SUBSIDIARY
  5. C***PURPOSE Initialize a work array for CFFTF and CFFTB.
  6. C***LIBRARY SLATEC (FFTPACK)
  7. C***CATEGORY J1A2
  8. C***TYPE COMPLEX (RFFTI-S, CFFTI-C)
  9. C***KEYWORDS FFTPACK, FOURIER TRANSFORM
  10. C***AUTHOR Swarztrauber, P. N., (NCAR)
  11. C***DESCRIPTION
  12. C
  13. C ********************************************************************
  14. C * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE *
  15. C ********************************************************************
  16. C * *
  17. C * This routine uses non-standard Fortran 77 constructs and will *
  18. C * be removed from the library at a future date. You are *
  19. C * requested to use CFFTI1. *
  20. C * *
  21. C ********************************************************************
  22. C
  23. C Subroutine CFFTI initializes the array WSAVE which is used in
  24. C both CFFTF and CFFTB. The prime factorization of N together with
  25. C a tabulation of the trigonometric functions are computed and
  26. C stored in WSAVE.
  27. C
  28. C Input Parameter
  29. C
  30. C N the length of the sequence to be transformed
  31. C
  32. C Output Parameter
  33. C
  34. C WSAVE a work array which must be dimensioned at least 4*N+15.
  35. C The same work array can be used for both CFFTF and CFFTB
  36. C as long as N remains unchanged. Different WSAVE arrays
  37. C are required for different values of N. The contents of
  38. C WSAVE must not be changed between calls of CFFTF or CFFTB.
  39. C
  40. C***REFERENCES P. N. Swarztrauber, Vectorizing the FFTs, in Parallel
  41. C Computations (G. Rodrigue, ed.), Academic Press,
  42. C 1982, pp. 51-83.
  43. C***ROUTINES CALLED CFFTI1
  44. C***REVISION HISTORY (YYMMDD)
  45. C 790601 DATE WRITTEN
  46. C 830401 Modified to use SLATEC library source file format.
  47. C 860115 Modified by Ron Boisvert to adhere to Fortran 77 by
  48. C changing dummy array size declarations (1) to (*).
  49. C 861211 REVISION DATE from Version 3.2
  50. C 881128 Modified by Dick Valent to meet prologue standards.
  51. C 891214 Prologue converted to Version 4.0 format. (BAB)
  52. C 900131 Routine changed from user-callable to subsidiary
  53. C because of non-standard Fortran 77 arguments in the
  54. C call to CFFTB1. (WRB)
  55. C 920501 Reformatted the REFERENCES section. (WRB)
  56. C***END PROLOGUE CFFTI
  57. DIMENSION WSAVE(*)
  58. C***FIRST EXECUTABLE STATEMENT CFFTI
  59. IF (N .EQ. 1) RETURN
  60. IW1 = N+N+1
  61. IW2 = IW1+N+N
  62. CALL CFFTI1 (N,WSAVE(IW1),WSAVE(IW2))
  63. RETURN
  64. END