Go to the documentation of this file.00001 SUBROUTINE SROTM(N,SX,INCX,SY,INCY,SPARAM)
00002
00003 INTEGER INCX,INCY,N
00004
00005
00006 REAL SPARAM(5),SX(*),SY(*)
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 REAL SFLAG,SH11,SH12,SH21,SH22,TWO,W,Z,ZERO
00058 INTEGER I,KX,KY,NSTEPS
00059
00060
00061 DATA ZERO,TWO/0.E0,2.E0/
00062
00063
00064 SFLAG = SPARAM(1)
00065 IF (N.LE.0 .OR. (SFLAG+TWO.EQ.ZERO)) GO TO 140
00066 IF (.NOT. (INCX.EQ.INCY.AND.INCX.GT.0)) GO TO 70
00067
00068 NSTEPS = N*INCX
00069 IF (SFLAG.LT.ZERO) THEN
00070 GO TO 50
00071 ELSE IF (SFLAG.EQ.ZERO) THEN
00072 GO TO 10
00073 ELSE
00074 GO TO 30
00075 END IF
00076 10 CONTINUE
00077 SH12 = SPARAM(4)
00078 SH21 = SPARAM(3)
00079 DO 20 I = 1,NSTEPS,INCX
00080 W = SX(I)
00081 Z = SY(I)
00082 SX(I) = W + Z*SH12
00083 SY(I) = W*SH21 + Z
00084 20 CONTINUE
00085 GO TO 140
00086 30 CONTINUE
00087 SH11 = SPARAM(2)
00088 SH22 = SPARAM(5)
00089 DO 40 I = 1,NSTEPS,INCX
00090 W = SX(I)
00091 Z = SY(I)
00092 SX(I) = W*SH11 + Z
00093 SY(I) = -W + SH22*Z
00094 40 CONTINUE
00095 GO TO 140
00096 50 CONTINUE
00097 SH11 = SPARAM(2)
00098 SH12 = SPARAM(4)
00099 SH21 = SPARAM(3)
00100 SH22 = SPARAM(5)
00101 DO 60 I = 1,NSTEPS,INCX
00102 W = SX(I)
00103 Z = SY(I)
00104 SX(I) = W*SH11 + Z*SH12
00105 SY(I) = W*SH21 + Z*SH22
00106 60 CONTINUE
00107 GO TO 140
00108 70 CONTINUE
00109 KX = 1
00110 KY = 1
00111 IF (INCX.LT.0) KX = 1 + (1-N)*INCX
00112 IF (INCY.LT.0) KY = 1 + (1-N)*INCY
00113
00114 IF (SFLAG.LT.ZERO) THEN
00115 GO TO 120
00116 ELSE IF (SFLAG.EQ.ZERO) THEN
00117 GO TO 80
00118 ELSE
00119 GO TO 100
00120 END IF
00121 80 CONTINUE
00122 SH12 = SPARAM(4)
00123 SH21 = SPARAM(3)
00124 DO 90 I = 1,N
00125 W = SX(KX)
00126 Z = SY(KY)
00127 SX(KX) = W + Z*SH12
00128 SY(KY) = W*SH21 + Z
00129 KX = KX + INCX
00130 KY = KY + INCY
00131 90 CONTINUE
00132 GO TO 140
00133 100 CONTINUE
00134 SH11 = SPARAM(2)
00135 SH22 = SPARAM(5)
00136 DO 110 I = 1,N
00137 W = SX(KX)
00138 Z = SY(KY)
00139 SX(KX) = W*SH11 + Z
00140 SY(KY) = -W + SH22*Z
00141 KX = KX + INCX
00142 KY = KY + INCY
00143 110 CONTINUE
00144 GO TO 140
00145 120 CONTINUE
00146 SH11 = SPARAM(2)
00147 SH12 = SPARAM(4)
00148 SH21 = SPARAM(3)
00149 SH22 = SPARAM(5)
00150 DO 130 I = 1,N
00151 W = SX(KX)
00152 Z = SY(KY)
00153 SX(KX) = W*SH11 + Z*SH12
00154 SY(KY) = W*SH21 + Z*SH22
00155 KX = KX + INCX
00156 KY = KY + INCY
00157 130 CONTINUE
00158 140 CONTINUE
00159 RETURN
00160 END