153 INTEGER M, NB, J1, LDA, LDH
157 COMPLEX*16 A( LDA, * ), H( LDH, * ), WORK( * )
163 parameter( zero = 0.0d+0, one = 1.0d+0 )
166 INTEGER J, K, K1, I1, I2, MJ
167 COMPLEX*16 PIV, ALPHA
171 INTEGER IZAMAX, ILAENV
172 EXTERNAL lsame, ilaenv, izamax
190 IF( lsame( uplo,
'U' ) )
THEN
197 IF ( j.GT.min(m, nb) )
226 CALL zgemv(
'No transpose', mj, j-k1,
227 $ -one, h( j, k1 ), ldh,
229 $ one, h( j, j ), 1 )
234 CALL zcopy( mj, h( j, j ), 1, work( 1 ), 1 )
242 CALL zaxpy( mj, alpha, a( k-2, j ), lda, work( 1 ), 1 )
247 a( k, j ) = work( 1 )
256 CALL zaxpy( m-j, alpha, a( k-1, j+1 ), lda,
262 i2 = izamax( m-j, work( 2 ), 1 ) + 1
267 IF( (i2.NE.2) .AND. (piv.NE.0) )
THEN
272 work( i2 ) = work( i1 )
279 CALL zswap( i2-i1-1, a( j1+i1-1, i1+1 ), lda,
280 $ a( j1+i1, i2 ), 1 )
285 $
CALL zswap( 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 zswap( i1-1, h( i1, 1 ), ldh, h( i2, 1 ), ldh )
299 IF( i1.GT.(k1-1) )
THEN
304 CALL zswap( i1-k1+1, a( 1, i1 ), 1,
313 a( k, j+1 ) = work( 2 )
319 CALL zcopy( 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 zcopy( m-j-1, work( 3 ), 1, a( k, j+2 ), lda )
330 CALL zscal( m-j-1, alpha, a( k, j+2 ), lda )
332 CALL zlaset(
'Full', 1, m-j-1, zero, zero,
348 IF( j.GT.min( m, nb ) )
377 CALL zgemv(
'No transpose', mj, j-k1,
378 $ -one, h( j, k1 ), ldh,
380 $ one, h( j, j ), 1 )
385 CALL zcopy( mj, h( j, j ), 1, work( 1 ), 1 )
393 CALL zaxpy( mj, alpha, a( j, k-2 ), 1, work( 1 ), 1 )
398 a( j, k ) = work( 1 )
407 CALL zaxpy( m-j, alpha, a( j+1, k-1 ), 1,
413 i2 = izamax( m-j, work( 2 ), 1 ) + 1
418 IF( (i2.NE.2) .AND. (piv.NE.0) )
THEN
423 work( i2 ) = work( i1 )
430 CALL zswap( i2-i1-1, a( i1+1, j1+i1-1 ), 1,
431 $ a( i2, j1+i1 ), lda )
436 $
CALL zswap( 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 zswap( i1-1, h( i1, 1 ), ldh, h( i2, 1 ), ldh )
450 IF( i1.GT.(k1-1) )
THEN
455 CALL zswap( i1-k1+1, a( i1, 1 ), lda,
464 a( j+1, k ) = work( 2 )
470 CALL zcopy( 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 zcopy( m-j-1, work( 3 ), 1, a( j+2, k ), 1 )
481 CALL zscal( m-j-1, alpha, a( j+2, k ), 1 )
483 CALL zlaset(
'Full', m-j-1, 1, zero, zero,
subroutine xerbla(srname, info)
subroutine zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
subroutine zlasyf_aa(uplo, j1, m, nb, a, lda, ipiv, h, ldh, work)
ZLASYF_AA
subroutine zlaset(uplo, m, n, alpha, beta, a, lda)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine zscal(n, za, zx, incx)
ZSCAL
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP