257 SUBROUTINE csytrf_rk( UPLO, N, A, LDA, E, IPIV, WORK, LWORK,
266 INTEGER INFO, LDA, LWORK, N
270 COMPLEX A( LDA, * ), E( * ), WORK( * )
276 LOGICAL LQUERY, UPPER
277 INTEGER I, IINFO, IP, IWS, K, KB, LDWORK, LWKOPT,
284 EXTERNAL lsame, ilaenv, sroundup_lwork
297 upper = lsame( uplo,
'U' )
298 lquery = ( lwork.EQ.-1 )
299 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
301 ELSE IF( n.LT.0 )
THEN
303 ELSE IF( lda.LT.max( 1, n ) )
THEN
305 ELSE IF( lwork.LT.1 .AND. .NOT.lquery )
THEN
313 nb = ilaenv( 1,
'CSYTRF_RK', uplo, n, -1, -1, -1 )
314 lwkopt = max( 1, n*nb )
315 work( 1 ) = sroundup_lwork(lwkopt)
319 CALL xerbla(
'CSYTRF_RK', -info )
321 ELSE IF( lquery )
THEN
327 IF( nb.GT.1 .AND. nb.LT.n )
THEN
329 IF( lwork.LT.iws )
THEN
330 nb = max( lwork / ldwork, 1 )
331 nbmin = max( 2, ilaenv( 2,
'CSYTRF_RK',
332 $ uplo, n, -1, -1, -1 ) )
361 CALL clasyf_rk( uplo, k, nb, kb, a, lda, e,
362 $ ipiv, work, ldwork, iinfo )
367 CALL csytf2_rk( uplo, k, a, lda, e, ipiv, iinfo )
373 IF( info.EQ.0 .AND. iinfo.GT.0 )
389 DO i = k, ( k - kb + 1 ), -1
390 ip = abs( ipiv( i ) )
392 CALL cswap( n-k, a( i, k+1 ), lda,
393 $ a( ip, k+1 ), lda )
429 CALL clasyf_rk( uplo, n-k+1, nb, kb, a( k, k ), lda, e( k ),
430 $ ipiv( k ), work, ldwork, iinfo )
437 CALL csytf2_rk( uplo, n-k+1, a( k, k ), lda, e( k ),
445 IF( info.EQ.0 .AND. iinfo.GT.0 )
446 $ info = iinfo + k - 1
451 IF( ipiv( i ).GT.0 )
THEN
452 ipiv( i ) = ipiv( i ) + k - 1
454 ipiv( i ) = ipiv( i ) - k + 1
468 DO i = k, ( k + kb - 1 ), 1
469 ip = abs( ipiv( i ) )
471 CALL cswap( k-1, a( i, 1 ), lda,
491 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine csytf2_rk(uplo, n, a, lda, e, ipiv, info)
CSYTF2_RK computes the factorization of a complex symmetric indefinite matrix using the bounded Bunch...
subroutine csytrf_rk(uplo, n, a, lda, e, ipiv, work, lwork, info)
CSYTRF_RK computes the factorization of a complex symmetric indefinite matrix using the bounded Bunch...
subroutine clasyf_rk(uplo, n, nb, kb, a, lda, e, ipiv, w, ldw, info)
CLASYF_RK computes a partial factorization of a complex symmetric indefinite matrix using bounded Bun...
subroutine cswap(n, cx, incx, cy, incy)
CSWAP