183 SUBROUTINE csytrf( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
192 INTEGER info, lda, lwork, n
196 COMPLEX a( lda, * ), work( * )
202 LOGICAL lquery, upper
203 INTEGER iinfo, iws, j, k, kb, ldwork, lwkopt, nb, nbmin
221 upper =
lsame( uplo,
'U' )
222 lquery = ( lwork.EQ.-1 )
223 IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
225 ELSE IF( n.LT.0 )
THEN
227 ELSE IF( lda.LT.max( 1, n ) )
THEN
229 ELSE IF( lwork.LT.1 .AND. .NOT.lquery )
THEN
237 nb =
ilaenv( 1,
'CSYTRF', uplo, n, -1, -1, -1 )
243 CALL
xerbla(
'CSYTRF', -info )
245 ELSE IF( lquery )
THEN
251 IF( nb.GT.1 .AND. nb.LT.n )
THEN
253 IF( lwork.LT.iws )
THEN
254 nb = max( lwork / ldwork, 1 )
255 nbmin = max( 2,
ilaenv( 2,
'CSYTRF', uplo, n, -1, -1, -1 ) )
284 CALL
clasyf( uplo, k, nb, kb, a, lda, ipiv, work, n, iinfo )
289 CALL
csytf2( uplo, k, a, lda, ipiv, iinfo )
295 IF( info.EQ.0 .AND. iinfo.GT.0 )
324 CALL
clasyf( uplo, n-k+1, nb, kb, a( k, k ), lda, ipiv( k ),
330 CALL
csytf2( uplo, n-k+1, a( k, k ), lda, ipiv( k ), iinfo )
336 IF( info.EQ.0 .AND. iinfo.GT.0 )
337 $ info = iinfo + k - 1
341 DO 30 j = k, k + kb - 1
342 IF( ipiv( j ).GT.0 )
THEN
343 ipiv( j ) = ipiv( j ) + k - 1
345 ipiv( j ) = ipiv( j ) - k + 1