113 SUBROUTINE zsytri( UPLO, N, A, LDA, IPIV, WORK, INFO )
125 COMPLEX*16 A( LDA, * ), WORK( * )
132 parameter( one = ( 1.0d+0, 0.0d+0 ),
133 $ zero = ( 0.0d+0, 0.0d+0 ) )
138 COMPLEX*16 AK, AKKP1, AKP1, D, T, TEMP
143 EXTERNAL lsame, zdotu
156 upper = lsame( uplo,
'U' )
157 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
159 ELSE IF( n.LT.0 )
THEN
161 ELSE IF( lda.LT.max( 1, n ) )
THEN
165 CALL xerbla(
'ZSYTRI', -info )
180 DO 10 info = n, 1, -1
181 IF( ipiv( info ).GT.0 .AND. a( info, info ).EQ.zero )
189 IF( ipiv( info ).GT.0 .AND. a( info, info ).EQ.zero )
210 IF( ipiv( k ).GT.0 )
THEN
216 a( k, k ) = one / a( k, k )
221 CALL zcopy( k-1, a( 1, k ), 1, work, 1 )
222 CALL zsymv( uplo, k-1, -one, a, lda, work, 1, zero,
224 a( k, k ) = a( k, k ) - zdotu( k-1, work, 1, a( 1, k ),
236 akp1 = a( k+1, k+1 ) / t
237 akkp1 = a( k, k+1 ) / t
238 d = t*( ak*akp1-one )
240 a( k+1, k+1 ) = ak / d
241 a( k, k+1 ) = -akkp1 / d
246 CALL zcopy( k-1, a( 1, k ), 1, work, 1 )
247 CALL zsymv( uplo, k-1, -one, a, lda, work, 1, zero,
249 a( k, k ) = a( k, k ) - zdotu( k-1, work, 1, a( 1, k ),
251 a( k, k+1 ) = a( k, k+1 ) -
252 $ zdotu( k-1, a( 1, k ), 1, a( 1, k+1 ), 1 )
253 CALL zcopy( k-1, a( 1, k+1 ), 1, work, 1 )
254 CALL zsymv( uplo, k-1, -one, a, lda, work, 1, zero,
256 a( k+1, k+1 ) = a( k+1, k+1 ) -
257 $ zdotu( k-1, work, 1, a( 1, k+1 ), 1 )
262 kp = abs( ipiv( k ) )
268 CALL zswap( kp-1, a( 1, k ), 1, a( 1, kp ), 1 )
269 CALL zswap( k-kp-1, a( kp+1, k ), 1, a( kp, kp+1 ), lda )
271 a( k, k ) = a( kp, kp )
273 IF( kstep.EQ.2 )
THEN
275 a( k, k+1 ) = a( kp, k+1 )
299 IF( ipiv( k ).GT.0 )
THEN
305 a( k, k ) = one / a( k, k )
310 CALL zcopy( n-k, a( k+1, k ), 1, work, 1 )
311 CALL zsymv( uplo, n-k, -one, a( k+1, k+1 ), lda, work, 1,
312 $ zero, a( k+1, k ), 1 )
313 a( k, k ) = a( k, k ) - zdotu( n-k, work, 1, a( k+1, k ),
324 ak = a( k-1, k-1 ) / t
326 akkp1 = a( k, k-1 ) / t
327 d = t*( ak*akp1-one )
328 a( k-1, k-1 ) = akp1 / d
330 a( k, k-1 ) = -akkp1 / d
335 CALL zcopy( n-k, a( k+1, k ), 1, work, 1 )
336 CALL zsymv( uplo, n-k, -one, a( k+1, k+1 ), lda, work, 1,
337 $ zero, a( k+1, k ), 1 )
338 a( k, k ) = a( k, k ) - zdotu( n-k, work, 1, a( k+1, k ),
340 a( k, k-1 ) = a( k, k-1 ) -
341 $ zdotu( n-k, a( k+1, k ), 1, a( k+1, k-1 ),
343 CALL zcopy( n-k, a( k+1, k-1 ), 1, work, 1 )
344 CALL zsymv( uplo, n-k, -one, a( k+1, k+1 ), lda, work, 1,
345 $ zero, a( k+1, k-1 ), 1 )
346 a( k-1, k-1 ) = a( k-1, k-1 ) -
347 $ zdotu( n-k, work, 1, a( k+1, k-1 ), 1 )
352 kp = abs( ipiv( k ) )
359 $
CALL zswap( n-kp, a( kp+1, k ), 1, a( kp+1, kp ), 1 )
360 CALL zswap( kp-k-1, a( k+1, k ), 1, a( kp, k+1 ), lda )
362 a( k, k ) = a( kp, kp )
364 IF( kstep.EQ.2 )
THEN
366 a( k, k-1 ) = a( kp, k-1 )
subroutine xerbla(srname, info)
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
ZSYMV computes a matrix-vector product for a complex symmetric matrix.
subroutine zsytri(uplo, n, a, lda, ipiv, work, info)
ZSYTRI
subroutine zswap(n, zx, incx, zy, incy)
ZSWAP