105 RECURSIVE SUBROUTINE spotrf2( UPLO, N, A, LDA, INFO )
123 parameter( one = 1.0e+0, zero=0.0e+0 )
127 INTEGER n1, n2, iinfo
144 upper =
lsame( uplo,
'U' )
145 IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
147 ELSE IF( n.LT.0 )
THEN
149 ELSE IF( lda.LT.max( 1, n ) )
THEN
153 CALL xerbla(
'SPOTRF2', -info )
168 IF( a( 1, 1 ).LE.zero.OR.
sisnan( a( 1, 1 ) ) )
THEN
175 a( 1, 1 ) = sqrt( a( 1, 1 ) )
185 CALL spotrf2( uplo, n1, a( 1, 1 ), lda, iinfo )
186 IF ( iinfo.NE.0 )
THEN
197 CALL strsm(
'L',
'U',
'T',
'N', n1, n2, one,
198 $ a( 1, 1 ), lda, a( 1, n1+1 ), lda )
202 CALL ssyrk( uplo,
'T', n2, n1, -one, a( 1, n1+1 ), lda,
203 $ one, a( n1+1, n1+1 ), lda )
204 CALL spotrf2( uplo, n2, a( n1+1, n1+1 ), lda, iinfo )
205 IF ( iinfo.NE.0 )
THEN
216 CALL strsm(
'R',
'L',
'T',
'N', n2, n1, one,
217 $ a( 1, 1 ), lda, a( n1+1, 1 ), lda )
221 CALL ssyrk( uplo,
'N', n2, n1, -one, a( n1+1, 1 ), lda,
222 $ one, a( n1+1, n1+1 ), lda )
223 CALL spotrf2( uplo, n2, a( n1+1, n1+1 ), lda, iinfo )
224 IF ( iinfo.NE.0 )
THEN
subroutine xerbla(srname, info)
subroutine ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
SSYRK
logical function sisnan(sin)
SISNAN tests input for NaN.
logical function lsame(ca, cb)
LSAME
recursive subroutine spotrf2(uplo, n, a, lda, info)
SPOTRF2
subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRSM