107 RECURSIVE SUBROUTINE zpotrf2( UPLO, N, A, LDA, INFO )
119 COMPLEX*16 A( lda, * )
125 DOUBLE PRECISION ONE, ZERO
126 parameter ( one = 1.0d+0, zero = 0.0d+0 )
128 parameter ( cone = (1.0d+0, 0.0d+0) )
132 INTEGER N1, N2, IINFO
136 LOGICAL LSAME, DISNAN
137 EXTERNAL lsame, disnan
143 INTRINSIC max, dble, sqrt
150 upper = lsame( uplo,
'U' )
151 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
153 ELSE IF( n.LT.0 )
THEN
155 ELSE IF( lda.LT.max( 1, n ) )
THEN
159 CALL xerbla(
'ZPOTRF2', -info )
174 ajj = dble( a( 1, 1 ) )
175 IF( ajj.LE.zero.OR.disnan( ajj ) )
THEN
182 a( 1, 1 ) = sqrt( ajj )
192 CALL zpotrf2( uplo, n1, a( 1, 1 ), lda, iinfo )
193 IF ( iinfo.NE.0 )
THEN
204 CALL ztrsm(
'L',
'U',
'C',
'N', n1, n2, cone,
205 $ a( 1, 1 ), lda, a( 1, n1+1 ), lda )
209 CALL zherk( uplo,
'C', n2, n1, -one, a( 1, n1+1 ), lda,
210 $ one, a( n1+1, n1+1 ), lda )
211 CALL zpotrf2( uplo, n2, a( n1+1, n1+1 ), lda, iinfo )
212 IF ( iinfo.NE.0 )
THEN
223 CALL ztrsm(
'R',
'L',
'C',
'N', n2, n1, cone,
224 $ a( 1, 1 ), lda, a( n1+1, 1 ), lda )
228 CALL zherk( uplo,
'N', n2, n1, -one, a( n1+1, 1 ), lda,
229 $ one, a( n1+1, n1+1 ), lda )
230 CALL zpotrf2( uplo, n2, a( n1+1, n1+1 ), lda, iinfo )
231 IF ( iinfo.NE.0 )
THEN
subroutine xerbla(SRNAME, INFO)
XERBLA
recursive subroutine zpotrf2(UPLO, N, A, LDA, INFO)
ZPOTRF2
subroutine zherk(UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)
ZHERK
subroutine ztrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRSM