rffti.f 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. *DECK RFFTI
  2. SUBROUTINE RFFTI (N, WSAVE)
  3. C***BEGIN PROLOGUE RFFTI
  4. C***SUBSIDIARY
  5. C***PURPOSE Initialize a work array for RFFTF and RFFTB.
  6. C***LIBRARY SLATEC (FFTPACK)
  7. C***CATEGORY J1A1
  8. C***TYPE SINGLE PRECISION (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 RFFTI1. *
  20. C * *
  21. C ********************************************************************
  22. C
  23. C Subroutine RFFTI initializes the array WSAVE which is used in
  24. C both RFFTF and RFFTB. 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 Argument
  29. C
  30. C N the length of the sequence to be transformed.
  31. C
  32. C Output Argument
  33. C
  34. C WSAVE a work array which must be dimensioned at least 2*N+15.
  35. C The same work array can be used for both RFFTF and RFFTB
  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 RFFTF or RFFTB.
  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 RFFTI1
  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 RFFTI
  57. DIMENSION WSAVE(*)
  58. C***FIRST EXECUTABLE STATEMENT RFFTI
  59. IF (N .EQ. 1) RETURN
  60. CALL RFFTI1 (N,WSAVE(N+1),WSAVE(2*N+1))
  61. RETURN
  62. END