131 SUBROUTINE dsytrf_aa( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
141 INTEGER N, LDA, LWORK, INFO
145 DOUBLE PRECISION A( LDA, * ), WORK( * )
150 DOUBLE PRECISION ZERO, ONE
151 parameter( zero = 0.0d+0, one = 1.0d+0 )
154 LOGICAL LQUERY, UPPER
156 INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB
157 DOUBLE PRECISION ALPHA
162 EXTERNAL lsame, ilaenv
175 nb = ilaenv( 1,
'DSYTRF_AA', uplo, n, -1, -1, -1 )
180 upper = lsame( uplo,
'U' )
181 lquery = ( lwork.EQ.-1 )
182 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
184 ELSE IF( n.LT.0 )
THEN
186 ELSE IF( lda.LT.max( 1, n ) )
THEN
188 ELSE IF( lwork.LT.max( 1, 2*n ) .AND. .NOT.lquery )
THEN
198 CALL xerbla(
'DSYTRF_AA', -info )
200 ELSE IF( lquery )
THEN
216 IF( lwork.LT.((1+nb)*n) )
THEN
228 CALL dcopy( n, a( 1, 1 ), lda, work( 1 ), 1 )
247 jb = min( n-j1+1, nb )
253 $ a( max(1, j), j+1 ), lda,
254 $ ipiv( j+1 ), work, n, work( n*nb+1 ) )
258 DO j2 = j+2, min(n, j+jb+1)
259 ipiv( j2 ) = ipiv( j2 ) + j
260 IF( (j2.NE.ipiv(j2)) .AND. ((j1-k1).GT.2) )
THEN
261 CALL dswap( j1-k1-2, a( 1, j2 ), 1,
262 $ a( 1, ipiv(j2) ), 1 )
275 IF( j1.GT.1 .OR. jb.GT.1 )
THEN
281 CALL dcopy( n-j, a( j-1, j+1 ), lda,
282 $ work( (j+1-j1+1)+jb*n ), 1 )
283 CALL dscal( n-j, alpha, work( (j+1-j1+1)+jb*n ), 1 )
306 nj = min( nb, n-j2+1 )
312 CALL dgemv(
'No transpose', mj, jb+1,
313 $ -one, work( j3-j1+1+k1*n ), n,
315 $ one, a( j3, j3 ), lda )
321 CALL dgemm(
'Transpose',
'Transpose',
323 $ -one, a( j1-k2, j2 ), lda,
324 $ work( j3-j1+1+k1*n ), n,
325 $ one, a( j2, j3 ), lda )
335 CALL dcopy( n-j, a( j+1, j+1 ), lda, work( 1 ), 1 )
347 CALL dcopy( n, a( 1, 1 ), 1, work( 1 ), 1 )
366 jb = min( n-j1+1, nb )
372 $ a( j+1, max(1, j) ), lda,
373 $ ipiv( j+1 ), work, n, work( n*nb+1 ) )
377 DO j2 = j+2, min(n, j+jb+1)
378 ipiv( j2 ) = ipiv( j2 ) + j
379 IF( (j2.NE.ipiv(j2)) .AND. ((j1-k1).GT.2) )
THEN
380 CALL dswap( j1-k1-2, a( j2, 1 ), lda,
381 $ a( ipiv(j2), 1 ), lda )
394 IF( j1.GT.1 .OR. jb.GT.1 )
THEN
400 CALL dcopy( n-j, a( j+1, j-1 ), 1,
401 $ work( (j+1-j1+1)+jb*n ), 1 )
402 CALL dscal( n-j, alpha, work( (j+1-j1+1)+jb*n ), 1 )
425 nj = min( nb, n-j2+1 )
431 CALL dgemv(
'No transpose', mj, jb+1,
432 $ -one, work( j3-j1+1+k1*n ), n,
433 $ a( j3, j1-k2 ), lda,
434 $ one, a( j3, j3 ), 1 )
440 CALL dgemm(
'No transpose',
'Transpose',
442 $ -one, work( j3-j1+1+k1*n ), n,
443 $ a( j2, j1-k2 ), lda,
444 $ one, a( j3, j2 ), lda )
454 CALL dcopy( n-j, a( j+1, j+1 ), 1, work( 1 ), 1 )
subroutine xerbla(srname, info)
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV
subroutine dsytrf_aa(uplo, n, a, lda, ipiv, work, lwork, info)
DSYTRF_AA
subroutine dlasyf_aa(uplo, j1, m, nb, a, lda, ipiv, h, ldh, work)
DLASYF_AA
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dswap(n, dx, incx, dy, incy)
DSWAP