163 CHARACTER DIAG, TRANS, UPLO
164 INTEGER INFO, LDA, LDB, N, NRHS
168 REAL A( LDA, * ), B( LDB, * )
175 parameter( one = 1.0e+0 )
180 REAL D11, D12, D21, D22, T1, T2
197 IF( .NOT.lsame( uplo,
'U' ) .AND. .NOT.lsame( uplo,
'L' ) )
THEN
199 ELSE IF( .NOT.lsame( trans,
'N' ) .AND. .NOT.
200 $ lsame( trans,
'T' ) .AND. .NOT.lsame( trans,
'C' ) )
THEN
202 ELSE IF( .NOT.lsame( diag,
'U' ) .AND. .NOT.lsame( diag,
'N' ) )
205 ELSE IF( n.LT.0 )
THEN
207 ELSE IF( lda.LT.max( 1, n ) )
THEN
209 ELSE IF( ldb.LT.max( 1, n ) )
THEN
213 CALL xerbla(
'SLAVSY_ROOK ', -info )
222 nounit = lsame( diag,
'N' )
228 IF( lsame( trans,
'N' ) )
THEN
233 IF( lsame( uplo,
'U' ) )
THEN
241 IF( ipiv( k ).GT.0 )
THEN
248 $
CALL sscal( nrhs, a( k, k ), b( k, 1 ), ldb )
256 CALL sger( k-1, nrhs, one, a( 1, k ), 1, b( k, 1 ),
257 $ ldb, b( 1, 1 ), ldb )
263 $
CALL sswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
280 b( k, j ) = d11*t1 + d12*t2
281 b( k+1, j ) = d21*t1 + d22*t2
291 CALL sger( k-1, nrhs, one, a( 1, k ), 1, b( k, 1 ),
292 $ ldb, b( 1, 1 ), ldb )
293 CALL sger( k-1, nrhs, one, a( 1, k+1 ), 1,
294 $ b( k+1, 1 ), ldb, b( 1, 1 ), ldb )
301 kp = abs( ipiv( k ) )
303 $
CALL sswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
307 kp = abs( ipiv( k+1 ) )
309 $
CALL sswap( nrhs, b( k+1, 1 ), ldb, b( kp, 1 ),
332 IF( ipiv( k ).GT.0 )
THEN
339 $
CALL sscal( nrhs, a( k, k ), b( k, 1 ), ldb )
348 CALL sger( n-k, nrhs, one, a( k+1, k ), 1, b( k, 1 ),
349 $ ldb, b( k+1, 1 ), ldb )
355 $
CALL sswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
373 b( k-1, j ) = d11*t1 + d12*t2
374 b( k, j ) = d21*t1 + d22*t2
384 CALL sger( n-k, nrhs, one, a( k+1, k ), 1, b( k, 1 ),
385 $ ldb, b( k+1, 1 ), ldb )
386 CALL sger( n-k, nrhs, one, a( k+1, k-1 ), 1,
387 $ b( k-1, 1 ), ldb, b( k+1, 1 ), ldb )
394 kp = abs( ipiv( k ) )
396 $
CALL sswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
400 kp = abs( ipiv( k-1 ) )
402 $
CALL sswap( nrhs, b( k-1, 1 ), ldb, b( kp, 1 ),
421 IF( lsame( uplo,
'U' ) )
THEN
432 IF( ipiv( k ).GT.0 )
THEN
439 $
CALL sswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
443 CALL sgemv(
'Transpose', k-1, nrhs, one, b, ldb,
444 $ a( 1, k ), 1, one, b( k, 1 ), ldb )
447 $
CALL sscal( nrhs, a( k, k ), b( k, 1 ), ldb )
457 kp = abs( ipiv( k ) )
459 $
CALL sswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
463 kp = abs( ipiv( k-1 ) )
465 $
CALL sswap( nrhs, b( k-1, 1 ), ldb, b( kp, 1 ),
470 CALL sgemv(
'Transpose', k-2, nrhs, one, b, ldb,
471 $ a( 1, k ), 1, one, b( k, 1 ), ldb )
472 CALL sgemv(
'Transpose', k-2, nrhs, one, b, ldb,
473 $ a( 1, k-1 ), 1, one, b( k-1, 1 ), ldb )
486 b( k-1, j ) = d11*t1 + d12*t2
487 b( k, j ) = d21*t1 + d22*t2
510 IF( ipiv( k ).GT.0 )
THEN
517 $
CALL sswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
521 CALL sgemv(
'Transpose', n-k, nrhs, one, b( k+1, 1 ),
522 $ ldb, a( k+1, k ), 1, one, b( k, 1 ), ldb )
525 $
CALL sscal( nrhs, a( k, k ), b( k, 1 ), ldb )
535 kp = abs( ipiv( k ) )
537 $
CALL sswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
541 kp = abs( ipiv( k+1 ) )
543 $
CALL sswap( nrhs, b( k+1, 1 ), ldb, b( kp, 1 ),
548 CALL sgemv(
'Transpose', n-k-1, nrhs, one,
549 $ b( k+2, 1 ), ldb, a( k+2, k+1 ), 1, one,
551 CALL sgemv(
'Transpose', n-k-1, nrhs, one,
552 $ b( k+2, 1 ), ldb, a( k+2, k ), 1, one,
566 b( k, j ) = d11*t1 + d12*t2
567 b( k+1, j ) = d21*t1 + d22*t2
subroutine xerbla(srname, info)
subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
SGEMV
subroutine sger(m, n, alpha, x, incx, y, incy, a, lda)
SGER
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine sswap(n, sx, incx, sy, incy)
SSWAP
subroutine slavsy_rook(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
SLAVSY_ROOK