144 SUBROUTINE dgbtf2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
151 INTEGER INFO, KL, KU, LDAB, M, N
155 DOUBLE PRECISION AB( LDAB, * )
161 DOUBLE PRECISION ONE, ZERO
162 parameter( one = 1.0d+0, zero = 0.0d+0 )
165 INTEGER I, J, JP, JU, KM, KV
189 ELSE IF( n.LT.0 )
THEN
191 ELSE IF( kl.LT.0 )
THEN
193 ELSE IF( ku.LT.0 )
THEN
195 ELSE IF( ldab.LT.kl+kv+1 )
THEN
199 CALL xerbla(
'DGBTF2', -info )
205 IF( m.EQ.0 .OR. n.EQ.0 )
212 DO 20 j = ku + 2, min( kv, n )
213 DO 10 i = kv - j + 2, kl
223 DO 40 j = 1, min( m, n )
237 jp = idamax( km+1, ab( kv+1, j ), 1 )
238 ipiv( j ) = jp + j - 1
239 IF( ab( kv+jp, j ).NE.zero )
THEN
240 ju = max( ju, min( j+ku+jp-1, n ) )
245 $
CALL dswap( ju-j+1, ab( kv+jp, j ), ldab-1,
246 $ ab( kv+1, j ), ldab-1 )
252 CALL dscal( km, one / ab( kv+1, j ), ab( kv+2, j ), 1 )
257 $
CALL dger( km, ju-j, -one, ab( kv+2, j ), 1,
258 $ ab( kv, j+1 ), ldab-1, ab( kv+1, j+1 ),
subroutine xerbla(srname, info)
subroutine dgbtf2(m, n, kl, ku, ab, ldab, ipiv, info)
DGBTF2 computes the LU factorization of a general band matrix using the unblocked version of the algo...
subroutine dger(m, n, alpha, x, incx, y, incy, a, lda)
DGER
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dswap(n, dx, incx, dy, incy)
DSWAP