201 SUBROUTINE clasr( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
209 CHARACTER direct, pivot, side
221 parameter( one = 1.0e+0, zero = 0.0e+0 )
243 IF( .NOT.(
lsame( side,
'L' ) .OR.
lsame( side,
'R' ) ) )
THEN
245 ELSE IF( .NOT.(
lsame( pivot,
'V' ) .OR.
lsame( pivot,
246 $
'T' ) .OR.
lsame( pivot,
'B' ) ) )
THEN
248 ELSE IF( .NOT.(
lsame( direct,
'F' ) .OR.
lsame( direct,
'B' ) ) )
251 ELSE IF( m.LT.0 )
THEN
253 ELSE IF( n.LT.0 )
THEN
255 ELSE IF( lda.LT.max( 1, m ) )
THEN
259 CALL
xerbla(
'CLASR ', info )
265 IF( ( m.EQ.0 ) .OR. ( n.EQ.0 ) )
267 IF(
lsame( side,
'L' ) )
THEN
271 IF(
lsame( pivot,
'V' ) )
THEN
272 IF(
lsame( direct,
'F' ) )
THEN
276 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
279 a( j+1, i ) = ctemp*temp - stemp*a( j, i )
280 a( j, i ) = stemp*temp + ctemp*a( j, i )
284 ELSE IF(
lsame( direct,
'B' ) )
THEN
285 DO 40 j = m - 1, 1, -1
288 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
291 a( j+1, i ) = ctemp*temp - stemp*a( j, i )
292 a( j, i ) = stemp*temp + ctemp*a( j, i )
297 ELSE IF(
lsame( pivot,
'T' ) )
THEN
298 IF(
lsame( direct,
'F' ) )
THEN
302 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
305 a( j, i ) = ctemp*temp - stemp*a( 1, i )
306 a( 1, i ) = stemp*temp + ctemp*a( 1, i )
310 ELSE IF(
lsame( direct,
'B' ) )
THEN
314 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
317 a( j, i ) = ctemp*temp - stemp*a( 1, i )
318 a( 1, i ) = stemp*temp + ctemp*a( 1, i )
323 ELSE IF(
lsame( pivot,
'B' ) )
THEN
324 IF(
lsame( direct,
'F' ) )
THEN
328 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
331 a( j, i ) = stemp*a( m, i ) + ctemp*temp
332 a( m, i ) = ctemp*a( m, i ) - stemp*temp
336 ELSE IF(
lsame( direct,
'B' ) )
THEN
337 DO 120 j = m - 1, 1, -1
340 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
343 a( j, i ) = stemp*a( m, i ) + ctemp*temp
344 a( m, i ) = ctemp*a( m, i ) - stemp*temp
350 ELSE IF(
lsame( side,
'R' ) )
THEN
354 IF(
lsame( pivot,
'V' ) )
THEN
355 IF(
lsame( direct,
'F' ) )
THEN
359 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
362 a( i, j+1 ) = ctemp*temp - stemp*a( i, j )
363 a( i, j ) = stemp*temp + ctemp*a( i, j )
367 ELSE IF(
lsame( direct,
'B' ) )
THEN
368 DO 160 j = n - 1, 1, -1
371 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
374 a( i, j+1 ) = ctemp*temp - stemp*a( i, j )
375 a( i, j ) = stemp*temp + ctemp*a( i, j )
380 ELSE IF(
lsame( pivot,
'T' ) )
THEN
381 IF(
lsame( direct,
'F' ) )
THEN
385 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
388 a( i, j ) = ctemp*temp - stemp*a( i, 1 )
389 a( i, 1 ) = stemp*temp + ctemp*a( i, 1 )
393 ELSE IF(
lsame( direct,
'B' ) )
THEN
397 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
400 a( i, j ) = ctemp*temp - stemp*a( i, 1 )
401 a( i, 1 ) = stemp*temp + ctemp*a( i, 1 )
406 ELSE IF(
lsame( pivot,
'B' ) )
THEN
407 IF(
lsame( direct,
'F' ) )
THEN
411 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
414 a( i, j ) = stemp*a( i, n ) + ctemp*temp
415 a( i, n ) = ctemp*a( i, n ) - stemp*temp
419 ELSE IF(
lsame( direct,
'B' ) )
THEN
420 DO 240 j = n - 1, 1, -1
423 IF( ( ctemp.NE.one ) .OR. ( stemp.NE.zero ) )
THEN
426 a( i, j ) = stemp*a( i, n ) + ctemp*temp
427 a( i, n ) = ctemp*a( i, n ) - stemp*temp