153 INTEGER M, NB, J1, LDA, LDH
157 COMPLEX A( LDA, * ), H( LDH, * ), WORK( * )
163 parameter( zero = 0.0e+0, one = 1.0e+0 )
166 INTEGER J, K, K1, I1, I2, MJ
171 INTEGER ICAMAX, ILAENV
172 EXTERNAL lsame, ilaenv, icamax
190 IF( lsame( uplo,
'U' ) )
THEN
197 IF ( j.GT.min(m, nb) )
226 CALL cgemv(
'No transpose', mj, j-k1,
227 $ -one, h( j, k1 ), ldh,
229 $ one, h( j, j ), 1 )
234 CALL ccopy( mj, h( j, j ), 1, work( 1 ), 1 )
242 CALL caxpy( mj, alpha, a( k-2, j ), lda, work( 1 ), 1 )
247 a( k, j ) = work( 1 )
256 CALL caxpy( m-j, alpha, a( k-1, j+1 ), lda,
262 i2 = icamax( m-j, work( 2 ), 1 ) + 1
267 IF( (i2.NE.2) .AND. (piv.NE.0) )
THEN
272 work( i2 ) = work( i1 )
279 CALL cswap( i2-i1-1, a( j1+i1-1, i1+1 ), lda,
280 $ a( j1+i1, i2 ), 1 )
285 $
CALL cswap( m-i2, a( j1+i1-1, i2+1 ), lda,
286 $ a( j1+i2-1, i2+1 ), lda )
290 piv = a( i1+j1-1, i1 )
291 a( j1+i1-1, i1 ) = a( j1+i2-1, i2 )
292 a( j1+i2-1, i2 ) = piv
296 CALL cswap( i1-1, h( i1, 1 ), ldh, h( i2, 1 ), ldh )
299 IF( i1.GT.(k1-1) )
THEN
304 CALL cswap( i1-k1+1, a( 1, i1 ), 1,
313 a( k, j+1 ) = work( 2 )
319 CALL ccopy( m-j, a( k+1, j+1 ), lda,
326 IF( j.LT.(m-1) )
THEN
327 IF( a( k, j+1 ).NE.zero )
THEN
328 alpha = one / a( k, j+1 )
329 CALL ccopy( m-j-1, work( 3 ), 1, a( k, j+2 ), lda )
330 CALL cscal( m-j-1, alpha, a( k, j+2 ), lda )
332 CALL claset(
'Full', 1, m-j-1, zero, zero,
348 IF( j.GT.min( m, nb ) )
377 CALL cgemv(
'No transpose', mj, j-k1,
378 $ -one, h( j, k1 ), ldh,
380 $ one, h( j, j ), 1 )
385 CALL ccopy( mj, h( j, j ), 1, work( 1 ), 1 )
393 CALL caxpy( mj, alpha, a( j, k-2 ), 1, work( 1 ), 1 )
398 a( j, k ) = work( 1 )
407 CALL caxpy( m-j, alpha, a( j+1, k-1 ), 1,
413 i2 = icamax( m-j, work( 2 ), 1 ) + 1
418 IF( (i2.NE.2) .AND. (piv.NE.0) )
THEN
423 work( i2 ) = work( i1 )
430 CALL cswap( i2-i1-1, a( i1+1, j1+i1-1 ), 1,
431 $ a( i2, j1+i1 ), lda )
436 $
CALL cswap( m-i2, a( i2+1, j1+i1-1 ), 1,
437 $ a( i2+1, j1+i2-1 ), 1 )
441 piv = a( i1, j1+i1-1 )
442 a( i1, j1+i1-1 ) = a( i2, j1+i2-1 )
443 a( i2, j1+i2-1 ) = piv
447 CALL cswap( i1-1, h( i1, 1 ), ldh, h( i2, 1 ), ldh )
450 IF( i1.GT.(k1-1) )
THEN
455 CALL cswap( i1-k1+1, a( i1, 1 ), lda,
464 a( j+1, k ) = work( 2 )
470 CALL ccopy( m-j, a( j+1, k+1 ), 1,
477 IF( j.LT.(m-1) )
THEN
478 IF( a( j+1, k ).NE.zero )
THEN
479 alpha = one / a( j+1, k )
480 CALL ccopy( m-j-1, work( 3 ), 1, a( j+2, k ), 1 )
481 CALL cscal( m-j-1, alpha, a( j+2, k ), 1 )
483 CALL claset(
'Full', m-j-1, 1, zero, zero,
subroutine xerbla(srname, info)
subroutine caxpy(n, ca, cx, incx, cy, incy)
CAXPY
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV
subroutine clasyf_aa(uplo, j1, m, nb, a, lda, ipiv, h, ldh, work)
CLASYF_AA
subroutine claset(uplo, m, n, alpha, beta, a, lda)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine cscal(n, ca, cx, incx)
CSCAL
subroutine cswap(n, cx, incx, cy, incy)
CSWAP