153 INTEGER M, NB, J1, LDA, LDH
157 DOUBLE PRECISION A( LDA, * ), H( LDH, * ), WORK( * )
162 DOUBLE PRECISION ZERO, ONE
163 parameter( zero = 0.0d+0, one = 1.0d+0 )
166 INTEGER J, K, K1, I1, I2, MJ
167 DOUBLE PRECISION PIV, ALPHA
171 INTEGER IDAMAX, ILAENV
172 EXTERNAL lsame, ilaenv, idamax
190 IF( lsame( uplo,
'U' ) )
THEN
197 IF ( j.GT.min(m, nb) )
226 CALL dgemv(
'No transpose', mj, j-k1,
227 $ -one, h( j, k1 ), ldh,
229 $ one, h( j, j ), 1 )
234 CALL dcopy( mj, h( j, j ), 1, work( 1 ), 1 )
242 CALL daxpy( mj, alpha, a( k-2, j ), lda, work( 1 ), 1 )
247 a( k, j ) = work( 1 )
256 CALL daxpy( m-j, alpha, a( k-1, j+1 ), lda,
262 i2 = idamax( m-j, work( 2 ), 1 ) + 1
267 IF( (i2.NE.2) .AND. (piv.NE.0) )
THEN
272 work( i2 ) = work( i1 )
279 CALL dswap( i2-i1-1, a( j1+i1-1, i1+1 ), lda,
280 $ a( j1+i1, i2 ), 1 )
285 $
CALL dswap( 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 dswap( i1-1, h( i1, 1 ), ldh, h( i2, 1 ), ldh )
299 IF( i1.GT.(k1-1) )
THEN
304 CALL dswap( i1-k1+1, a( 1, i1 ), 1,
313 a( k, j+1 ) = work( 2 )
319 CALL dcopy( 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 dcopy( m-j-1, work( 3 ), 1, a( k, j+2 ), lda )
330 CALL dscal( m-j-1, alpha, a( k, j+2 ), lda )
332 CALL dlaset(
'Full', 1, m-j-1, zero, zero,
348 IF( j.GT.min( m, nb ) )
377 CALL dgemv(
'No transpose', mj, j-k1,
378 $ -one, h( j, k1 ), ldh,
380 $ one, h( j, j ), 1 )
385 CALL dcopy( mj, h( j, j ), 1, work( 1 ), 1 )
393 CALL daxpy( mj, alpha, a( j, k-2 ), 1, work( 1 ), 1 )
398 a( j, k ) = work( 1 )
407 CALL daxpy( m-j, alpha, a( j+1, k-1 ), 1,
413 i2 = idamax( m-j, work( 2 ), 1 ) + 1
418 IF( (i2.NE.2) .AND. (piv.NE.0) )
THEN
423 work( i2 ) = work( i1 )
430 CALL dswap( i2-i1-1, a( i1+1, j1+i1-1 ), 1,
431 $ a( i2, j1+i1 ), lda )
436 $
CALL dswap( 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 dswap( i1-1, h( i1, 1 ), ldh, h( i2, 1 ), ldh )
450 IF( i1.GT.(k1-1) )
THEN
455 CALL dswap( i1-k1+1, a( i1, 1 ), lda,
464 a( j+1, k ) = work( 2 )
470 CALL dcopy( 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 dcopy( m-j-1, work( 3 ), 1, a( j+2, k ), 1 )
481 CALL dscal( m-j-1, alpha, a( j+2, k ), 1 )
483 CALL dlaset(
'Full', m-j-1, 1, zero, zero,
subroutine xerbla(srname, info)
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV
subroutine dlasyf_aa(uplo, j1, m, nb, a, lda, ipiv, h, ldh, work)
DLASYF_AA
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dswap(n, dx, incx, dy, incy)
DSWAP