161 CHARACTER DIAG, TRANS, UPLO
162 INTEGER INFO, LDA, LDB, N, NRHS
166 COMPLEX A( LDA, * ), B( LDB, * )
173 parameter( cone = ( 1.0e+0, 0.0e+0 ) )
178 COMPLEX D11, D12, D21, D22, T1, T2
195 IF( .NOT.lsame( uplo,
'U' ) .AND. .NOT.lsame( uplo,
'L' ) )
THEN
197 ELSE IF( .NOT.lsame( trans,
'N' ) .AND. .NOT.lsame( trans,
'T' ) )
200 ELSE IF( .NOT.lsame( diag,
'U' ) .AND. .NOT.lsame( diag,
'N' ) )
203 ELSE IF( n.LT.0 )
THEN
205 ELSE IF( lda.LT.max( 1, n ) )
THEN
207 ELSE IF( ldb.LT.max( 1, n ) )
THEN
211 CALL xerbla(
'CLAVSY_ROOK ', -info )
220 nounit = lsame( diag,
'N' )
226 IF( lsame( trans,
'N' ) )
THEN
231 IF( lsame( uplo,
'U' ) )
THEN
239 IF( ipiv( k ).GT.0 )
THEN
246 $
CALL cscal( nrhs, a( k, k ), b( k, 1 ), ldb )
254 CALL cgeru( k-1, nrhs, cone, a( 1, k ), 1, b( k, 1 ),
255 $ ldb, b( 1, 1 ), ldb )
261 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
278 b( k, j ) = d11*t1 + d12*t2
279 b( k+1, j ) = d21*t1 + d22*t2
289 CALL cgeru( k-1, nrhs, cone, a( 1, k ), 1, b( k, 1 ),
290 $ ldb, b( 1, 1 ), ldb )
291 CALL cgeru( k-1, nrhs, cone, a( 1, k+1 ), 1,
292 $ b( k+1, 1 ), ldb, b( 1, 1 ), ldb )
299 kp = abs( ipiv( k ) )
301 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
305 kp = abs( ipiv( k+1 ) )
307 $
CALL cswap( nrhs, b( k+1, 1 ), ldb, b( kp, 1 ),
330 IF( ipiv( k ).GT.0 )
THEN
337 $
CALL cscal( nrhs, a( k, k ), b( k, 1 ), ldb )
346 CALL cgeru( n-k, nrhs, cone, a( k+1, k ), 1,
347 $ b( k, 1 ), ldb, b( k+1, 1 ), ldb )
353 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
371 b( k-1, j ) = d11*t1 + d12*t2
372 b( k, j ) = d21*t1 + d22*t2
382 CALL cgeru( n-k, nrhs, cone, a( k+1, k ), 1,
383 $ b( k, 1 ), ldb, b( k+1, 1 ), ldb )
384 CALL cgeru( n-k, nrhs, cone, a( k+1, k-1 ), 1,
385 $ b( k-1, 1 ), ldb, b( k+1, 1 ), ldb )
392 kp = abs( ipiv( k ) )
394 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
398 kp = abs( ipiv( k-1 ) )
400 $
CALL cswap( nrhs, b( k-1, 1 ), ldb, b( kp, 1 ),
413 ELSE IF( lsame( trans,
'T' ) )
THEN
419 IF( lsame( uplo,
'U' ) )
THEN
429 IF( ipiv( k ).GT.0 )
THEN
436 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
440 CALL cgemv(
'Transpose', k-1, nrhs, cone, b, ldb,
441 $ a( 1, k ), 1, cone, b( k, 1 ), ldb )
444 $
CALL cscal( nrhs, a( k, k ), b( k, 1 ), ldb )
454 kp = abs( ipiv( k ) )
456 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
460 kp = abs( ipiv( k-1 ) )
462 $
CALL cswap( nrhs, b( k-1, 1 ), ldb, b( kp, 1 ),
467 CALL cgemv(
'Transpose', k-2, nrhs, cone, b, ldb,
468 $ a( 1, k ), 1, cone, b( k, 1 ), ldb )
469 CALL cgemv(
'Transpose', k-2, nrhs, cone, b, ldb,
470 $ a( 1, k-1 ), 1, cone, b( k-1, 1 ), ldb )
483 b( k-1, j ) = d11*t1 + d12*t2
484 b( k, j ) = d21*t1 + d22*t2
507 IF( ipiv( k ).GT.0 )
THEN
514 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
518 CALL cgemv(
'Transpose', n-k, nrhs, cone, b( k+1, 1 ),
519 $ ldb, a( k+1, k ), 1, cone, b( k, 1 ), ldb )
522 $
CALL cscal( nrhs, a( k, k ), b( k, 1 ), ldb )
532 kp = abs( ipiv( k ) )
534 $
CALL cswap( nrhs, b( k, 1 ), ldb, b( kp, 1 ), ldb )
538 kp = abs( ipiv( k+1 ) )
540 $
CALL cswap( nrhs, b( k+1, 1 ), ldb, b( kp, 1 ),
545 CALL cgemv(
'Transpose', n-k-1, nrhs, cone,
546 $ b( k+2, 1 ), ldb, a( k+2, k+1 ), 1, cone,
548 CALL cgemv(
'Transpose', n-k-1, nrhs, cone,
549 $ b( k+2, 1 ), ldb, a( k+2, k ), 1, cone,
563 b( k, j ) = d11*t1 + d12*t2
564 b( k+1, j ) = d21*t1 + d22*t2
subroutine xerbla(srname, info)
subroutine clavsy_rook(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
CLAVSY_ROOK
subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV
subroutine cgeru(m, n, alpha, x, incx, y, incy, a, lda)
CGERU
subroutine cscal(n, ca, cx, incx)
CSCAL
subroutine cswap(n, cx, incx, cy, incy)
CSWAP