154 SUBROUTINE dlavsy( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
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 ', -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 )
298 kp = abs( ipiv( k ) )
300 $ CALL
dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
322 IF( ipiv( k ).GT.0 )
THEN
329 $ CALL
dscal( nrhs, a( k, k ), b( k, 1 ), ldb )
338 CALL
dger( n-k, nrhs, one, a( k+1, k ), 1, b( k, 1 ),
339 $ ldb, b( k+1, 1 ), ldb )
345 $ CALL
dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
363 b( k-1, j ) = d11*t1 + d12*t2
364 b( k, j ) = d21*t1 + d22*t2
374 CALL
dger( n-k, nrhs, one, a( k+1, k ), 1, b( k, 1 ),
375 $ ldb, b( k+1, 1 ), ldb )
376 CALL
dger( n-k, nrhs, one, a( k+1, k-1 ), 1,
377 $ b( k-1, 1 ), ldb, b( k+1, 1 ), ldb )
382 kp = abs( ipiv( k ) )
384 $ CALL
dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
402 IF(
lsame( uplo,
'U' ) )
THEN
413 IF( ipiv( k ).GT.0 )
THEN
420 $ CALL
dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
424 CALL
dgemv(
'Transpose', k-1, nrhs, one, b, ldb,
425 $ a( 1, k ), 1, one, b( k, 1 ), ldb )
428 $ CALL
dscal( nrhs, a( k, k ), b( k, 1 ), ldb )
438 kp = abs( ipiv( k ) )
440 $ CALL
dswap( nrhs, b( k-1, 1 ), ldb, b( kp, 1 ),
445 CALL
dgemv(
'Transpose', k-2, nrhs, one, b, ldb,
446 $ a( 1, k ), 1, one, b( k, 1 ), ldb )
447 CALL
dgemv(
'Transpose', k-2, nrhs, one, b, ldb,
448 $ a( 1, k-1 ), 1, one, b( k-1, 1 ), ldb )
461 b( k-1, j ) = d11*t1 + d12*t2
462 b( k, j ) = d21*t1 + d22*t2
485 IF( ipiv( k ).GT.0 )
THEN
492 $ CALL
dswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
496 CALL
dgemv(
'Transpose', n-k, nrhs, one, b( k+1, 1 ),
497 $ ldb, a( k+1, k ), 1, one, b( k, 1 ), ldb )
500 $ CALL
dscal( nrhs, a( k, k ), b( k, 1 ), ldb )
510 kp = abs( ipiv( k ) )
512 $ CALL
dswap( nrhs, b( k+1, 1 ), ldb, b( kp, 1 ),
517 CALL
dgemv(
'Transpose', n-k-1, nrhs, one,
518 $ b( k+2, 1 ), ldb, a( k+2, k+1 ), 1, one,
520 CALL
dgemv(
'Transpose', n-k-1, nrhs, one,
521 $ b( k+2, 1 ), ldb, a( k+2, k ), 1, one,
535 b( k, j ) = d11*t1 + d12*t2
536 b( k+1, j ) = d21*t1 + d22*t2