198 SUBROUTINE slasr( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
205 CHARACTER DIRECT, PIVOT, SIDE
209 REAL A( LDA, * ), C( * ), S( * )
216 parameter( one = 1.0e+0, zero = 0.0e+0 )
220 REAL CTEMP, STEMP, TEMP
237 IF( .NOT.( lsame( side,
'L' ) .OR. lsame( side,
'R' ) ) )
THEN
239 ELSE IF( .NOT.( lsame( pivot,
'V' ) .OR. lsame( pivot,
240 $
'T' ) .OR. lsame( pivot,
'B' ) ) )
THEN
242 ELSE IF( .NOT.( lsame( direct,
'F' ) .OR. lsame( direct,
'B' ) ) )
245 ELSE IF( m.LT.0 )
THEN
247 ELSE IF( n.LT.0 )
THEN
249 ELSE IF( lda.LT.max( 1, m ) )
THEN
253 CALL xerbla(
'SLASR ', info )
259 IF( ( m.EQ.0 ) .OR. ( n.EQ.0 ) )
261 IF( lsame( side,
'L' ) )
THEN
265 IF( lsame( pivot,
'V' ) )
THEN
266 IF( lsame( direct,
'F' ) )
THEN
270 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
273 a( j+1, i ) = ctemp*temp - stemp*a( j, i )
274 a( j, i ) = stemp*temp + ctemp*a( j, i )
278 ELSE IF( lsame( direct,
'B' ) )
THEN
279 DO 40 j = m - 1, 1, -1
282 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
285 a( j+1, i ) = ctemp*temp - stemp*a( j, i )
286 a( j, i ) = stemp*temp + ctemp*a( j, i )
291 ELSE IF( lsame( pivot,
'T' ) )
THEN
292 IF( lsame( direct,
'F' ) )
THEN
296 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
299 a( j, i ) = ctemp*temp - stemp*a( 1, i )
300 a( 1, i ) = stemp*temp + ctemp*a( 1, i )
304 ELSE IF( lsame( direct,
'B' ) )
THEN
308 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
311 a( j, i ) = ctemp*temp - stemp*a( 1, i )
312 a( 1, i ) = stemp*temp + ctemp*a( 1, i )
317 ELSE IF( lsame( pivot,
'B' ) )
THEN
318 IF( lsame( direct,
'F' ) )
THEN
322 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
325 a( j, i ) = stemp*a( m, i ) + ctemp*temp
326 a( m, i ) = ctemp*a( m, i ) - stemp*temp
330 ELSE IF( lsame( direct,
'B' ) )
THEN
331 DO 120 j = m - 1, 1, -1
334 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
337 a( j, i ) = stemp*a( m, i ) + ctemp*temp
338 a( m, i ) = ctemp*a( m, i ) - stemp*temp
344 ELSE IF( lsame( side,
'R' ) )
THEN
348 IF( lsame( pivot,
'V' ) )
THEN
349 IF( lsame( direct,
'F' ) )
THEN
353 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
356 a( i, j+1 ) = ctemp*temp - stemp*a( i, j )
357 a( i, j ) = stemp*temp + ctemp*a( i, j )
361 ELSE IF( lsame( direct,
'B' ) )
THEN
362 DO 160 j = n - 1, 1, -1
365 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
368 a( i, j+1 ) = ctemp*temp - stemp*a( i, j )
369 a( i, j ) = stemp*temp + ctemp*a( i, j )
374 ELSE IF( lsame( pivot,
'T' ) )
THEN
375 IF( lsame( direct,
'F' ) )
THEN
379 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
382 a( i, j ) = ctemp*temp - stemp*a( i, 1 )
383 a( i, 1 ) = stemp*temp + ctemp*a( i, 1 )
387 ELSE IF( lsame( direct,
'B' ) )
THEN
391 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
394 a( i, j ) = ctemp*temp - stemp*a( i, 1 )
395 a( i, 1 ) = stemp*temp + ctemp*a( i, 1 )
400 ELSE IF( lsame( pivot,
'B' ) )
THEN
401 IF( lsame( direct,
'F' ) )
THEN
405 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
408 a( i, j ) = stemp*a( i, n ) + ctemp*temp
409 a( i, n ) = ctemp*a( i, n ) - stemp*temp
413 ELSE IF( lsame( direct,
'B' ) )
THEN
414 DO 240 j = n - 1, 1, -1
417 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
420 a( i, j ) = stemp*a( i, n ) + ctemp*temp
421 a( i, n ) = ctemp*a( i, n ) - stemp*temp
subroutine xerbla(srname, info)
subroutine slasr(side, pivot, direct, m, n, c, s, a, lda)
SLASR applies a sequence of plane rotations to a general rectangular matrix.