131 SUBROUTINE chetrf_aa( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
141 INTEGER N, LDA, LWORK, INFO
145 COMPLEX A( LDA, * ), WORK( * )
151 parameter( zero = (0.0e+0, 0.0e+0), one = (1.0e+0, 0.0e+0) )
154 LOGICAL LQUERY, UPPER
156 INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB
163 EXTERNAL lsame, ilaenv, sroundup_lwork
169 INTRINSIC real, conjg, max
175 nb = ilaenv( 1,
'CHETRF_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.( 2*n ) .AND. .NOT.lquery )
THEN
194 work( 1 ) = sroundup_lwork(lwkopt)
198 CALL xerbla(
'CHETRF_AA', -info )
200 ELSE IF( lquery )
THEN
211 a( 1, 1 ) = real( a( 1, 1 ) )
217 IF( lwork.LT.((1+nb)*n) )
THEN
229 CALL ccopy( n, a( 1, 1 ), lda, work( 1 ), 1 )
248 jb = min( n-j1+1, nb )
254 $ a( max(1, j), j+1 ), lda,
255 $ ipiv( j+1 ), work, n, work( n*nb+1 ) )
259 DO j2 = j+2, min(n, j+jb+1)
260 ipiv( j2 ) = ipiv( j2 ) + j
261 IF( (j2.NE.ipiv(j2)) .AND. ((j1-k1).GT.2) )
THEN
262 CALL cswap( j1-k1-2, a( 1, j2 ), 1,
263 $ a( 1, ipiv(j2) ), 1 )
276 IF( j1.GT.1 .OR. jb.GT.1 )
THEN
280 alpha = conjg( a( j, j+1 ) )
282 CALL ccopy( n-j, a( j-1, j+1 ), lda,
283 $ work( (j+1-j1+1)+jb*n ), 1 )
284 CALL cscal( n-j, alpha, work( (j+1-j1+1)+jb*n ), 1 )
307 nj = min( nb, n-j2+1 )
313 CALL cgemm(
'Conjugate transpose',
'Transpose',
315 $ -one, a( j1-k2, j3 ), lda,
316 $ work( (j3-j1+1)+k1*n ), n,
317 $ one, a( j3, j3 ), lda )
323 CALL cgemm(
'Conjugate transpose',
'Transpose',
325 $ -one, a( j1-k2, j2 ), lda,
326 $ work( (j3-j1+1)+k1*n ), n,
327 $ one, a( j2, j3 ), lda )
332 a( j, j+1 ) = conjg( alpha )
337 CALL ccopy( n-j, a( j+1, j+1 ), lda, work( 1 ), 1 )
349 CALL ccopy( n, a( 1, 1 ), 1, work( 1 ), 1 )
368 jb = min( n-j1+1, nb )
374 $ a( j+1, max(1, j) ), lda,
375 $ ipiv( j+1 ), work, n, work( n*nb+1 ) )
379 DO j2 = j+2, min(n, j+jb+1)
380 ipiv( j2 ) = ipiv( j2 ) + j
381 IF( (j2.NE.ipiv(j2)) .AND. ((j1-k1).GT.2) )
THEN
382 CALL cswap( j1-k1-2, a( j2, 1 ), lda,
383 $ a( ipiv(j2), 1 ), lda )
396 IF( j1.GT.1 .OR. jb.GT.1 )
THEN
400 alpha = conjg( a( j+1, j ) )
402 CALL ccopy( n-j, a( j+1, j-1 ), 1,
403 $ work( (j+1-j1+1)+jb*n ), 1 )
404 CALL cscal( n-j, alpha, work( (j+1-j1+1)+jb*n ), 1 )
427 nj = min( nb, n-j2+1 )
433 CALL cgemm(
'No transpose',
'Conjugate transpose',
435 $ -one, work( (j3-j1+1)+k1*n ), n,
436 $ a( j3, j1-k2 ), lda,
437 $ one, a( j3, j3 ), lda )
443 CALL cgemm(
'No transpose',
'Conjugate transpose',
445 $ -one, work( (j3-j1+1)+k1*n ), n,
446 $ a( j2, j1-k2 ), lda,
447 $ one, a( j3, j2 ), lda )
452 a( j+1, j ) = conjg( alpha )
457 CALL ccopy( n-j, a( j+1, j+1 ), 1, work( 1 ), 1 )
463 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM
subroutine chetrf_aa(uplo, n, a, lda, ipiv, work, lwork, info)
CHETRF_AA
subroutine clahef_aa(uplo, j1, m, nb, a, lda, ipiv, h, ldh, work)
CLAHEF_AA
subroutine cscal(n, ca, cx, incx)
CSCAL
subroutine cswap(n, cx, incx, cy, incy)
CSWAP