1 SUBROUTINE dlasr( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
9 CHARACTER DIRECT, PIVOT, SIDE
13 DOUBLE PRECISION A( LDA, * ), C( * ), S( * )
107 DOUBLE PRECISION ONE, ZERO
108 parameter( one = 1.0d+0, zero = 0.0d+0 )
112 DOUBLE PRECISION CTEMP, STEMP, TEMP
129 IF( .NOT.( lsame( side,
'L' ) .OR. lsame( side,
'R' ) ) )
THEN
131 ELSE IF( .NOT.( lsame( pivot,
'V' ) .OR. lsame( pivot,
132 $
'T' ) .OR. lsame( pivot,
'B' ) ) )
THEN
134 ELSE IF( .NOT.( lsame( direct,
'F' ) .OR. lsame( direct,
'B' ) ) )
137 ELSE IF( m.LT.0 )
THEN
139 ELSE IF( n.LT.0 )
THEN
141 ELSE IF( lda.LT.max( 1, m ) )
THEN
145 CALL xerbla(
'DLASR ', info )
151 IF( ( m.EQ.0 ) .OR. ( n.EQ.0 ) )
153 IF( lsame( side,
'L' ) )
THEN
157 IF( lsame( pivot,
'V' ) )
THEN
158 IF( lsame( direct,
'F' ) )
THEN
162 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
165 a( j+1, i ) = ctemp*temp - stemp*a( j, i )
166 a( j, i ) = stemp*temp + ctemp*a( j, i )
170 ELSE IF( lsame( direct,
'B' ) )
THEN
171 DO 40 j = m - 1, 1, -1
174 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
177 a( j+1, i ) = ctemp*temp - stemp*a( j, i )
178 a( j, i ) = stemp*temp + ctemp*a( j, i )
183 ELSE IF( lsame( pivot,
'T' ) )
THEN
184 IF( lsame( direct,
'F' ) )
THEN
188 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
191 a( j, i ) = ctemp*temp - stemp*a( 1, i )
192 a( 1, i ) = stemp*temp + ctemp*a( 1, i )
196 ELSE IF( lsame( direct,
'B' ) )
THEN
200 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
203 a( j, i ) = ctemp*temp - stemp*a( 1, i )
204 a( 1, i ) = stemp*temp + ctemp*a( 1, i )
209 ELSE IF( lsame( pivot,
'B' ) )
THEN
210 IF( lsame( direct,
'F' ) )
THEN
214 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
217 a( j, i ) = stemp*a( m, i ) + ctemp*temp
218 a( m, i ) = ctemp*a( m, i ) - stemp*temp
222 ELSE IF( lsame( direct,
'B' ) )
THEN
223 DO 120 j = m - 1, 1, -1
226 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
229 a( j, i ) = stemp*a( m, i ) + ctemp*temp
230 a( m, i ) = ctemp*a( m, i ) - stemp*temp
236 ELSE IF( lsame( side,
'R' ) )
THEN
240 IF( lsame( pivot,
'V' ) )
THEN
241 IF( lsame( direct,
'F' ) )
THEN
245 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
248 a( i, j+1 ) = ctemp*temp - stemp*a( i, j )
249 a( i, j ) = stemp*temp + ctemp*a( i, j )
253 ELSE IF( lsame( direct,
'B' ) )
THEN
254 DO 160 j = n - 1, 1, -1
257 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
260 a( i, j+1 ) = ctemp*temp - stemp*a( i, j )
261 a( i, j ) = stemp*temp + ctemp*a( i, j )
266 ELSE IF( lsame( pivot,
'T' ) )
THEN
267 IF( lsame( direct,
'F' ) )
THEN
271 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
274 a( i, j ) = ctemp*temp - stemp*a( i, 1 )
275 a( i, 1 ) = stemp*temp + ctemp*a( i, 1 )
279 ELSE IF( lsame( direct,
'B' ) )
THEN
283 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
286 a( i, j ) = ctemp*temp - stemp*a( i, 1 )
287 a( i, 1 ) = stemp*temp + ctemp*a( i, 1 )
292 ELSE IF( lsame( pivot,
'B' ) )
THEN
293 IF( lsame( direct,
'F' ) )
THEN
297 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
300 a( i, j ) = stemp*a( i, n ) + ctemp*temp
301 a( i, n ) = ctemp*a( i, n ) - stemp*temp
305 ELSE IF( lsame( direct,
'B' ) )
THEN
306 DO 240 j = n - 1, 1, -1
309 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
312 a( i, j ) = stemp*a( i, n ) + ctemp*temp
313 a( i, n ) = ctemp*a( i, n ) - stemp*temp
subroutine dlasr(SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA)
subroutine xerbla(SRNAME, INFO)