107 RECURSIVE SUBROUTINE cpotrf2( UPLO, N, A, LDA, INFO )
126 parameter ( one = 1.0e+0, zero = 0.0e+0 )
128 parameter ( cone = (1.0e+0, 0.0e+0) )
132 INTEGER N1, N2, IINFO
136 LOGICAL LSAME, SISNAN
137 EXTERNAL lsame, sisnan
143 INTRINSIC max,
REAL, 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(
'CPOTRF2', -info )
174 ajj =
REAL( A( 1, 1 ) )
175 IF( ajj.LE.zero.OR.sisnan( ajj ) )
THEN
182 a( 1, 1 ) = sqrt( ajj )
192 CALL cpotrf2( uplo, n1, a( 1, 1 ), lda, iinfo )
193 IF ( iinfo.NE.0 )
THEN
204 CALL ctrsm(
'L',
'U',
'C',
'N', n1, n2, cone,
205 $ a( 1, 1 ), lda, a( 1, n1+1 ), lda )
209 CALL cherk( uplo,
'C', n2, n1, -one, a( 1, n1+1 ), lda,
210 $ one, a( n1+1, n1+1 ), lda )
212 CALL cpotrf2( uplo, n2, a( n1+1, n1+1 ), lda, iinfo )
214 IF ( iinfo.NE.0 )
THEN
225 CALL ctrsm(
'R',
'L',
'C',
'N', n2, n1, cone,
226 $ a( 1, 1 ), lda, a( n1+1, 1 ), lda )
230 CALL cherk( uplo,
'N', n2, n1, -one, a( n1+1, 1 ), lda,
231 $ one, a( n1+1, n1+1 ), lda )
233 CALL cpotrf2( uplo, n2, a( n1+1, n1+1 ), lda, iinfo )
235 IF ( iinfo.NE.0 )
THEN
subroutine cherk(UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)
CHERK
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ctrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRSM
recursive subroutine cpotrf2(UPLO, N, A, LDA, INFO)
CPOTRF2