163 CHARACTER DIAG, TRANS, UPLO
164 INTEGER INFO, LDA, LDB, N, NRHS
168 DOUBLE PRECISION A( LDA, * ), B( LDB, * )
175 parameter( one = 1.0d+0 )
180 DOUBLE PRECISION 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(
'DLAVSY_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 dscal( nrhs, a( k, k ), b( k, 1 ), ldb )
256 CALL dger( k-1, nrhs, one, a( 1, k ), 1, b( k, 1 ),
257 $ ldb, b( 1, 1 ), ldb )
263 $
CALL dswap( 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 dger( k-1, nrhs, one, a( 1, k ), 1, b( k, 1 ),
292 $ ldb, b( 1, 1 ), ldb )
293 CALL dger( 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 dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
307 kp = abs( ipiv( k+1 ) )
309 $
CALL dswap( nrhs, b( k+1, 1 ), ldb, b( kp, 1 ),
332 IF( ipiv( k ).GT.0 )
THEN
339 $
CALL dscal( nrhs, a( k, k ), b( k, 1 ), ldb )
348 CALL dger( n-k, nrhs, one, a( k+1, k ), 1, b( k, 1 ),
349 $ ldb, b( k+1, 1 ), ldb )
355 $
CALL dswap( 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 dger( n-k, nrhs, one, a( k+1, k ), 1, b( k, 1 ),
385 $ ldb, b( k+1, 1 ), ldb )
386 CALL dger( 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 dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
400 kp = abs( ipiv( k-1 ) )
402 $
CALL dswap( nrhs, b( k-1, 1 ), ldb, b( kp, 1 ),
421 IF( lsame( uplo,
'U' ) )
THEN
432 IF( ipiv( k ).GT.0 )
THEN
439 $
CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
443 CALL dgemv(
'Transpose', k-1, nrhs, one, b, ldb,
444 $ a( 1, k ), 1, one, b( k, 1 ), ldb )
447 $
CALL dscal( nrhs, a( k, k ), b( k, 1 ), ldb )
457 kp = abs( ipiv( k ) )
459 $
CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
463 kp = abs( ipiv( k-1 ) )
465 $
CALL dswap( nrhs, b( k-1, 1 ), ldb, b( kp, 1 ),
470 CALL dgemv(
'Transpose', k-2, nrhs, one, b, ldb,
471 $ a( 1, k ), 1, one, b( k, 1 ), ldb )
472 CALL dgemv(
'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 dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
521 CALL dgemv(
'Transpose', n-k, nrhs, one, b( k+1, 1 ),
522 $ ldb, a( k+1, k ), 1, one, b( k, 1 ), ldb )
525 $
CALL dscal( nrhs, a( k, k ), b( k, 1 ), ldb )
535 kp = abs( ipiv( k ) )
537 $
CALL dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
541 kp = abs( ipiv( k+1 ) )
543 $
CALL dswap( nrhs, b( k+1, 1 ), ldb, b( kp, 1 ),
548 CALL dgemv(
'Transpose', n-k-1, nrhs, one,
549 $ b( k+2, 1 ), ldb, a( k+2, k+1 ), 1, one,
551 CALL dgemv(
'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 dlavsy_rook(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
DLAVSY_ROOK
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV
subroutine dger(m, n, alpha, x, incx, y, incy, a, lda)
DGER
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dswap(n, dx, incx, dy, incy)
DSWAP