131 SUBROUTINE csytrf_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, one = 1.0e+0 )
154 LOGICAL LQUERY, UPPER
156 INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB
163 EXTERNAL lsame, ilaenv, sroundup_lwork
176 nb = ilaenv( 1,
'CSYTRF_AA', uplo, n, -1, -1, -1 )
181 upper = lsame( uplo,
'U' )
182 lquery = ( lwork.EQ.-1 )
183 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
185 ELSE IF( n.LT.0 )
THEN
187 ELSE IF( lda.LT.max( 1, n ) )
THEN
189 ELSE IF( lwork.LT.max( 1, 2*n ) .AND. .NOT.lquery )
THEN
195 work( 1 ) = sroundup_lwork(lwkopt)
199 CALL xerbla(
'CSYTRF_AA', -info )
201 ELSE IF( lquery )
THEN
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
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 cgemv(
'No transpose', mj, jb+1,
314 $ -one, work( j3-j1+1+k1*n ), n,
316 $ one, a( j3, j3 ), lda )
322 CALL cgemm(
'Transpose',
'Transpose',
324 $ -one, a( j1-k2, j2 ), lda,
325 $ work( j3-j1+1+k1*n ), n,
326 $ one, a( j2, j3 ), lda )
336 CALL ccopy( n-j, a( j+1, j+1 ), lda, work( 1 ), 1 )
348 CALL ccopy( n, a( 1, 1 ), 1, work( 1 ), 1 )
367 jb = min( n-j1+1, nb )
373 $ a( j+1, max(1, j) ), lda,
374 $ ipiv( j+1 ), work, n, work( n*nb+1 ) )
378 DO j2 = j+2, min(n, j+jb+1)
379 ipiv( j2 ) = ipiv( j2 ) + j
380 IF( (j2.NE.ipiv(j2)) .AND. ((j1-k1).GT.2) )
THEN
381 CALL cswap( j1-k1-2, a( j2, 1 ), lda,
382 $ a( ipiv(j2), 1 ), lda )
395 IF( j1.GT.1 .OR. jb.GT.1 )
THEN
401 CALL ccopy( n-j, a( j+1, j-1 ), 1,
402 $ work( (j+1-j1+1)+jb*n ), 1 )
403 CALL cscal( n-j, alpha, work( (j+1-j1+1)+jb*n ), 1 )
426 nj = min( nb, n-j2+1 )
432 CALL cgemv(
'No transpose', mj, jb+1,
433 $ -one, work( j3-j1+1+k1*n ), n,
434 $ a( j3, j1-k2 ), lda,
435 $ one, a( j3, j3 ), 1 )
441 CALL cgemm(
'No transpose',
'Transpose',
443 $ -one, work( j3-j1+1+k1*n ), n,
444 $ a( j2, j1-k2 ), lda,
445 $ one, a( j3, j2 ), lda )
455 CALL ccopy( n-j, a( j+1, j+1 ), 1, work( 1 ), 1 )
461 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 cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV
subroutine csytrf_aa(uplo, n, a, lda, ipiv, work, lwork, info)
CSYTRF_AA
subroutine clasyf_aa(uplo, j1, m, nb, a, lda, ipiv, h, ldh, work)
CLASYF_AA
subroutine cscal(n, ca, cx, incx)
CSCAL
subroutine cswap(n, cx, incx, cy, incy)
CSWAP