112 RECURSIVE SUBROUTINE sgetrf2( M, N, A, LDA, IPIV, INFO )
119 INTEGER info, lda, m, n
130 parameter( one = 1.0e+0, zero = 0.0e+0 )
134 INTEGER i, iinfo, n1, n2
154 ELSE IF( n.LT.0 )
THEN
156 ELSE IF( lda.LT.max( 1, m ) )
THEN
160 CALL xerbla(
'SGETRF2', -info )
166 IF( m.EQ.0 .OR. n.EQ.0 )
175 IF ( a(1,1).EQ.zero )
178 ELSE IF( n.EQ.1 )
THEN
189 i =
isamax( m, a( 1, 1 ), 1 )
191 IF( a( i, 1 ).NE.zero )
THEN
197 a( 1, 1 ) = a( i, 1 )
203 IF( abs(a( 1, 1 )) .GE. sfmin )
THEN
204 CALL sscal( m-1, one / a( 1, 1 ), a( 2, 1 ), 1 )
207 a( 1+i, 1 ) = a( 1+i, 1 ) / a( 1, 1 )
226 CALL sgetrf2( m, n1, a, lda, ipiv, iinfo )
228 IF ( info.EQ.0 .AND. iinfo.GT.0 )
235 CALL slaswp( n2, a( 1, n1+1 ), lda, 1, n1, ipiv, 1 )
239 CALL strsm(
'L',
'L',
'N',
'U', n1, n2, one, a, lda,
240 $ a( 1, n1+1 ), lda )
244 CALL sgemm(
'N',
'N', m-n1, n2, n1, -one, a( n1+1, 1 ), lda,
245 $ a( 1, n1+1 ), lda, one, a( n1+1, n1+1 ), lda )
249 CALL sgetrf2( m-n1, n2, a( n1+1, n1+1 ), lda, ipiv( n1+1 ),
254 IF ( info.EQ.0 .AND. iinfo.GT.0 )
256 DO 20 i = n1+1, min( m, n )
257 ipiv( i ) = ipiv( i ) + n1
262 CALL slaswp( n1, a( 1, 1 ), lda, n1+1, min( m, n), ipiv, 1 )
subroutine xerbla(srname, info)
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
recursive subroutine sgetrf2(m, n, a, lda, ipiv, info)
SGETRF2
integer function isamax(n, sx, incx)
ISAMAX
real function slamch(cmach)
SLAMCH
subroutine slaswp(n, a, lda, k1, k2, ipiv, incx)
SLASWP performs a series of row interchanges on a general rectangular matrix.
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
STRSM