130 SUBROUTINE dsytri_rook( UPLO, N, A, LDA, IPIV, WORK, INFO )
143 DOUBLE PRECISION A( lda, * ), WORK( * )
149 DOUBLE PRECISION ONE, ZERO
150 parameter ( one = 1.0d+0, zero = 0.0d+0 )
155 DOUBLE PRECISION AK, AKKP1, AKP1, D, T, TEMP
159 DOUBLE PRECISION DDOT
173 upper = lsame( uplo,
'U' )
174 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
176 ELSE IF( n.LT.0 )
THEN
178 ELSE IF( lda.LT.max( 1, n ) )
THEN
182 CALL xerbla(
'DSYTRI_ROOK', -info )
197 DO 10 info = n, 1, -1
198 IF( ipiv( info ).GT.0 .AND. a( info, info ).EQ.zero )
206 IF( ipiv( info ).GT.0 .AND. a( info, info ).EQ.zero )
227 IF( ipiv( k ).GT.0 )
THEN
233 a( k, k ) = one / a( k, k )
238 CALL dcopy( k-1, a( 1, k ), 1, work, 1 )
239 CALL dsymv( uplo, k-1, -one, a, lda, work, 1, zero,
241 a( k, k ) = a( k, k ) - ddot( k-1, work, 1, a( 1, k ),
251 t = abs( a( k, k+1 ) )
253 akp1 = a( k+1, k+1 ) / t
254 akkp1 = a( k, k+1 ) / t
255 d = t*( ak*akp1-one )
257 a( k+1, k+1 ) = ak / d
258 a( k, k+1 ) = -akkp1 / d
263 CALL dcopy( k-1, a( 1, k ), 1, work, 1 )
264 CALL dsymv( uplo, k-1, -one, a, lda, work, 1, zero,
266 a( k, k ) = a( k, k ) - ddot( k-1, work, 1, a( 1, k ),
268 a( k, k+1 ) = a( k, k+1 ) -
269 $ ddot( k-1, a( 1, k ), 1, a( 1, k+1 ), 1 )
270 CALL dcopy( k-1, a( 1, k+1 ), 1, work, 1 )
271 CALL dsymv( uplo, k-1, -one, a, lda, work, 1, zero,
273 a( k+1, k+1 ) = a( k+1, k+1 ) -
274 $ ddot( k-1, work, 1, a( 1, k+1 ), 1 )
279 IF( kstep.EQ.1 )
THEN
287 $
CALL dswap( kp-1, a( 1, k ), 1, a( 1, kp ), 1 )
288 CALL dswap( k-kp-1, a( kp+1, k ), 1, a( kp, kp+1 ), lda )
290 a( k, k ) = a( kp, kp )
301 $
CALL dswap( kp-1, a( 1, k ), 1, a( 1, kp ), 1 )
302 CALL dswap( k-kp-1, a( kp+1, k ), 1, a( kp, kp+1 ), lda )
305 a( k, k ) = a( kp, kp )
308 a( k, k+1 ) = a( kp, k+1 )
316 $
CALL dswap( kp-1, a( 1, k ), 1, a( 1, kp ), 1 )
317 CALL dswap( k-kp-1, a( kp+1, k ), 1, a( kp, kp+1 ), lda )
319 a( k, k ) = a( kp, kp )
343 IF( ipiv( k ).GT.0 )
THEN
349 a( k, k ) = one / a( k, k )
354 CALL dcopy( n-k, a( k+1, k ), 1, work, 1 )
355 CALL dsymv( uplo, n-k, -one, a( k+1, k+1 ), lda, work, 1,
356 $ zero, a( k+1, k ), 1 )
357 a( k, k ) = a( k, k ) - ddot( n-k, work, 1, a( k+1, k ),
367 t = abs( a( k, k-1 ) )
368 ak = a( k-1, k-1 ) / t
370 akkp1 = a( k, k-1 ) / t
371 d = t*( ak*akp1-one )
372 a( k-1, k-1 ) = akp1 / d
374 a( k, k-1 ) = -akkp1 / d
379 CALL dcopy( n-k, a( k+1, k ), 1, work, 1 )
380 CALL dsymv( uplo, n-k, -one, a( k+1, k+1 ), lda, work, 1,
381 $ zero, a( k+1, k ), 1 )
382 a( k, k ) = a( k, k ) - ddot( n-k, work, 1, a( k+1, k ),
384 a( k, k-1 ) = a( k, k-1 ) -
385 $ ddot( n-k, a( k+1, k ), 1, a( k+1, k-1 ),
387 CALL dcopy( n-k, a( k+1, k-1 ), 1, work, 1 )
388 CALL dsymv( uplo, n-k, -one, a( k+1, k+1 ), lda, work, 1,
389 $ zero, a( k+1, k-1 ), 1 )
390 a( k-1, k-1 ) = a( k-1, k-1 ) -
391 $ ddot( n-k, work, 1, a( k+1, k-1 ), 1 )
396 IF( kstep.EQ.1 )
THEN
404 $
CALL dswap( n-kp, a( kp+1, k ), 1, a( kp+1, kp ), 1 )
405 CALL dswap( kp-k-1, a( k+1, k ), 1, a( kp, k+1 ), lda )
407 a( k, k ) = a( kp, kp )
418 $
CALL dswap( n-kp, a( kp+1, k ), 1, a( kp+1, kp ), 1 )
419 CALL dswap( kp-k-1, a( k+1, k ), 1, a( kp, k+1 ), lda )
422 a( k, k ) = a( kp, kp )
425 a( k, k-1 ) = a( kp, k-1 )
433 $
CALL dswap( n-kp, a( kp+1, k ), 1, a( kp+1, kp ), 1 )
434 CALL dswap( kp-k-1, a( k+1, k ), 1, a( kp, k+1 ), lda )
436 a( k, k ) = a( kp, kp )
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
subroutine dsytri_rook(UPLO, N, A, LDA, IPIV, WORK, INFO)
DSYTRI_ROOK
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dswap(N, DX, INCX, DY, INCY)
DSWAP
subroutine dsymv(UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
DSYMV