mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2025-01-01 06:23:39 +01:00
c977aa998f
Replace amos with slatec
61 lines
2 KiB
Fortran
61 lines
2 KiB
Fortran
*DECK RADF2
|
|
SUBROUTINE RADF2 (IDO, L1, CC, CH, WA1)
|
|
C***BEGIN PROLOGUE RADF2
|
|
C***SUBSIDIARY
|
|
C***PURPOSE Calculate the fast Fourier transform of subvectors of
|
|
C length two.
|
|
C***LIBRARY SLATEC (FFTPACK)
|
|
C***TYPE SINGLE PRECISION (RADF2-S)
|
|
C***AUTHOR Swarztrauber, P. N., (NCAR)
|
|
C***ROUTINES CALLED (NONE)
|
|
C***REVISION HISTORY (YYMMDD)
|
|
C 790601 DATE WRITTEN
|
|
C 830401 Modified to use SLATEC library source file format.
|
|
C 860115 Modified by Ron Boisvert to adhere to Fortran 77 by
|
|
C changing dummy array size declarations (1) to (*).
|
|
C 881128 Modified by Dick Valent to meet prologue standards.
|
|
C 890831 Modified array declarations. (WRB)
|
|
C 891214 Prologue converted to Version 4.0 format. (BAB)
|
|
C 900402 Added TYPE section. (WRB)
|
|
C***END PROLOGUE RADF2
|
|
DIMENSION CH(IDO,2,*), CC(IDO,L1,2), WA1(*)
|
|
C***FIRST EXECUTABLE STATEMENT RADF2
|
|
DO 101 K=1,L1
|
|
CH(1,1,K) = CC(1,K,1)+CC(1,K,2)
|
|
CH(IDO,2,K) = CC(1,K,1)-CC(1,K,2)
|
|
101 CONTINUE
|
|
IF (IDO-2) 107,105,102
|
|
102 IDP2 = IDO+2
|
|
IF((IDO-1)/2.LT.L1) GO TO 108
|
|
DO 104 K=1,L1
|
|
CDIR$ IVDEP
|
|
DO 103 I=3,IDO,2
|
|
IC = IDP2-I
|
|
TR2 = WA1(I-2)*CC(I-1,K,2)+WA1(I-1)*CC(I,K,2)
|
|
TI2 = WA1(I-2)*CC(I,K,2)-WA1(I-1)*CC(I-1,K,2)
|
|
CH(I,1,K) = CC(I,K,1)+TI2
|
|
CH(IC,2,K) = TI2-CC(I,K,1)
|
|
CH(I-1,1,K) = CC(I-1,K,1)+TR2
|
|
CH(IC-1,2,K) = CC(I-1,K,1)-TR2
|
|
103 CONTINUE
|
|
104 CONTINUE
|
|
GO TO 111
|
|
108 DO 110 I=3,IDO,2
|
|
IC = IDP2-I
|
|
CDIR$ IVDEP
|
|
DO 109 K=1,L1
|
|
TR2 = WA1(I-2)*CC(I-1,K,2)+WA1(I-1)*CC(I,K,2)
|
|
TI2 = WA1(I-2)*CC(I,K,2)-WA1(I-1)*CC(I-1,K,2)
|
|
CH(I,1,K) = CC(I,K,1)+TI2
|
|
CH(IC,2,K) = TI2-CC(I,K,1)
|
|
CH(I-1,1,K) = CC(I-1,K,1)+TR2
|
|
CH(IC-1,2,K) = CC(I-1,K,1)-TR2
|
|
109 CONTINUE
|
|
110 CONTINUE
|
|
111 IF (MOD(IDO,2) .EQ. 1) RETURN
|
|
105 DO 106 K=1,L1
|
|
CH(1,2,K) = -CC(IDO,K,2)
|
|
CH(IDO,1,K) = CC(IDO,K,1)
|
|
106 CONTINUE
|
|
107 RETURN
|
|
END
|