107 RECURSIVE SUBROUTINE dpotrf2( UPLO, N, A, LDA, INFO )
119 DOUBLE PRECISION A( lda, * )
125 DOUBLE PRECISION ONE, ZERO
126 parameter ( one = 1.0d+0, zero = 0.0d+0 )
130 INTEGER N1, N2, IINFO
133 LOGICAL LSAME, DISNAN
134 EXTERNAL lsame, disnan
147 upper = lsame( uplo,
'U' )
148 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
150 ELSE IF( n.LT.0 )
THEN
152 ELSE IF( lda.LT.max( 1, n ) )
THEN
156 CALL xerbla(
'DPOTRF2', -info )
171 IF( a( 1, 1 ).LE.zero.OR.disnan( a( 1, 1 ) ) )
THEN
178 a( 1, 1 ) = sqrt( a( 1, 1 ) )
188 CALL dpotrf2( uplo, n1, a( 1, 1 ), lda, iinfo )
189 IF ( iinfo.NE.0 )
THEN
200 CALL dtrsm(
'L',
'U',
'T',
'N', n1, n2, one,
201 $ a( 1, 1 ), lda, a( 1, n1+1 ), lda )
205 CALL dsyrk( uplo,
'T', n2, n1, -one, a( 1, n1+1 ), lda,
206 $ one, a( n1+1, n1+1 ), lda )
207 CALL dpotrf2( uplo, n2, a( n1+1, n1+1 ), lda, iinfo )
208 IF ( iinfo.NE.0 )
THEN
219 CALL dtrsm(
'R',
'L',
'T',
'N', n2, n1, one,
220 $ a( 1, 1 ), lda, a( n1+1, 1 ), lda )
224 CALL dsyrk( uplo,
'N', n2, n1, -one, a( n1+1, 1 ), lda,
225 $ one, a( n1+1, n1+1 ), lda )
226 CALL dpotrf2( uplo, n2, a( n1+1, n1+1 ), lda, iinfo )
227 IF ( iinfo.NE.0 )
THEN
subroutine dtrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
DTRSM
subroutine dsyrk(UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)
DSYRK
subroutine xerbla(SRNAME, INFO)
XERBLA
recursive subroutine dpotrf2(UPLO, N, A, LDA, INFO)
DPOTRF2