159 CHARACTER DIAG, TRANS, UPLO
160 INTEGER INFO, LDA, LDB, N, NRHS
164 COMPLEX*16 A( LDA, * ), B( LDB, * )
171 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
176 COMPLEX*16 D11, D12, D21, D22, T1, T2
186 INTRINSIC abs, dconjg, max
193 IF( .NOT.lsame( uplo,
'U' ) .AND. .NOT.lsame( uplo,
'L' ) )
THEN
195 ELSE IF( .NOT.lsame( trans,
'N' ) .AND. .NOT.lsame( trans,
'C' ) )
198 ELSE IF( .NOT.lsame( diag,
'U' ) .AND. .NOT.lsame( diag,
'N' ) )
201 ELSE IF( n.LT.0 )
THEN
203 ELSE IF( lda.LT.max( 1, n ) )
THEN
205 ELSE IF( ldb.LT.max( 1, n ) )
THEN
209 CALL xerbla(
'ZLAVHE_ROOK ', -info )
218 nounit = lsame( diag,
'N' )
224 IF( lsame( trans,
'N' ) )
THEN
229 IF( lsame( uplo,
'U' ) )
THEN
237 IF( ipiv( k ).GT.0 )
THEN
244 $
CALL zscal( nrhs, a( k, k ), b( k, 1 ), ldb )
252 CALL zgeru( k-1, nrhs, cone, a( 1, k ), 1, b( k, 1 ),
253 $ ldb, b( 1, 1 ), ldb )
259 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
276 b( k, j ) = d11*t1 + d12*t2
277 b( k+1, j ) = d21*t1 + d22*t2
287 CALL zgeru( k-1, nrhs, cone, a( 1, k ), 1, b( k, 1 ),
288 $ ldb, b( 1, 1 ), ldb )
289 CALL zgeru( k-1, nrhs, cone, a( 1, k+1 ), 1,
290 $ b( k+1, 1 ), ldb, b( 1, 1 ), ldb )
297 kp = abs( ipiv( k ) )
299 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
303 kp = abs( ipiv( k+1 ) )
305 $
CALL zswap( nrhs, b( k+1, 1 ), ldb, b( kp, 1 ),
328 IF( ipiv( k ).GT.0 )
THEN
335 $
CALL zscal( nrhs, a( k, k ), b( k, 1 ), ldb )
344 CALL zgeru( n-k, nrhs, cone, a( k+1, k ), 1,
345 $ b( k, 1 ), ldb, b( k+1, 1 ), ldb )
351 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
369 b( k-1, j ) = d11*t1 + d12*t2
370 b( k, j ) = d21*t1 + d22*t2
380 CALL zgeru( n-k, nrhs, cone, a( k+1, k ), 1,
381 $ b( k, 1 ), ldb, b( k+1, 1 ), ldb )
382 CALL zgeru( n-k, nrhs, cone, a( k+1, k-1 ), 1,
383 $ b( k-1, 1 ), ldb, b( k+1, 1 ), ldb )
391 kp = abs( ipiv( k ) )
393 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
397 kp = abs( ipiv( k-1 ) )
399 $
CALL zswap( nrhs, b( k-1, 1 ), ldb, b( kp, 1 ),
419 IF( lsame( uplo,
'U' ) )
THEN
429 IF( ipiv( k ).GT.0 )
THEN
436 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
442 CALL zlacgv( nrhs, b( k, 1 ), ldb )
443 CALL zgemv(
'Conjugate', k-1, nrhs, cone, b, ldb,
444 $ a( 1, k ), 1, cone, b( k, 1 ), ldb )
445 CALL zlacgv( nrhs, b( k, 1 ), ldb )
448 $
CALL zscal( nrhs, a( k, k ), b( k, 1 ), ldb )
458 kp = abs( ipiv( k ) )
460 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
464 kp = abs( ipiv( k-1 ) )
466 $
CALL zswap( nrhs, b( k-1, 1 ), ldb, b( kp, 1 ),
474 CALL zlacgv( nrhs, b( k, 1 ), ldb )
475 CALL zgemv(
'Conjugate', k-2, nrhs, cone, b, ldb,
476 $ a( 1, k ), 1, cone, b( k, 1 ), ldb )
477 CALL zlacgv( nrhs, b( k, 1 ), ldb )
479 CALL zlacgv( nrhs, b( k-1, 1 ), ldb )
480 CALL zgemv(
'Conjugate', k-2, nrhs, cone, b, ldb,
481 $ a( 1, k-1 ), 1, cone, b( k-1, 1 ), ldb )
482 CALL zlacgv( nrhs, b( k-1, 1 ), ldb )
495 b( k-1, j ) = d11*t1 + d12*t2
496 b( k, j ) = d21*t1 + d22*t2
519 IF( ipiv( k ).GT.0 )
THEN
526 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
530 CALL zlacgv( nrhs, b( k, 1 ), ldb )
531 CALL zgemv(
'Conjugate', n-k, nrhs, cone, b( k+1, 1 ),
532 $ ldb, a( k+1, k ), 1, cone, b( k, 1 ), ldb )
533 CALL zlacgv( nrhs, b( k, 1 ), ldb )
536 $
CALL zscal( nrhs, a( k, k ), b( k, 1 ), ldb )
546 kp = abs( ipiv( k ) )
548 $
CALL zswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
552 kp = abs( ipiv( k+1 ) )
554 $
CALL zswap( nrhs, b( k+1, 1 ), ldb, b( kp, 1 ),
559 CALL zlacgv( nrhs, b( k+1, 1 ), ldb )
560 CALL zgemv(
'Conjugate', n-k-1, nrhs, cone,
561 $ b( k+2, 1 ), ldb, a( k+2, k+1 ), 1, cone,
563 CALL zlacgv( nrhs, b( k+1, 1 ), ldb )
565 CALL zlacgv( nrhs, b( k, 1 ), ldb )
566 CALL zgemv(
'Conjugate', n-k-1, nrhs, cone,
567 $ b( k+2, 1 ), ldb, a( k+2, k ), 1, cone,
569 CALL zlacgv( nrhs, b( k, 1 ), ldb )
582 b( k, j ) = d11*t1 + d12*t2
583 b( k+1, j ) = d21*t1 + d22*t2
subroutine xerbla(srname, info)
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
subroutine zgeru(m, n, alpha, x, incx, y, incy, a, lda)
ZGERU
subroutine zlacgv(n, x, incx)
ZLACGV conjugates a complex vector.
subroutine zscal(n, za, zx, incx)
ZSCAL
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP
subroutine zlavhe_rook(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
ZLAVHE_ROOK