112 SUBROUTINE dlagge( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
119 INTEGER INFO, KL, KU, LDA, M, N
123 DOUBLE PRECISION A( LDA, * ), D( * ), WORK( * )
129 DOUBLE PRECISION ZERO, ONE
130 parameter( zero = 0.0d+0, one = 1.0d+0 )
134 DOUBLE PRECISION TAU, WA, WB, WN
140 INTRINSIC max, min, sign
143 DOUBLE PRECISION DNRM2
153 ELSE IF( n.LT.0 )
THEN
155 ELSE IF( kl.LT.0 .OR. kl.GT.m-1 )
THEN
157 ELSE IF( ku.LT.0 .OR. ku.GT.n-1 )
THEN
159 ELSE IF( lda.LT.max( 1, m ) )
THEN
163 CALL xerbla(
'DLAGGE', -info )
174 DO 30 i = 1, min( m, n )
180 IF(( kl .EQ. 0 ).AND.( ku .EQ. 0))
RETURN
184 DO 40 i = min( m, n ), 1, -1
189 CALL dlarnv( 3, iseed, m-i+1, work )
190 wn = dnrm2( m-i+1, work, 1 )
191 wa = sign( wn, work( 1 ) )
192 IF( wn.EQ.zero )
THEN
196 CALL dscal( m-i, one / wb, work( 2 ), 1 )
203 CALL dgemv(
'Transpose', m-i+1, n-i+1, one, a( i, i ), lda,
204 $ work, 1, zero, work( m+1 ), 1 )
205 CALL dger( m-i+1, n-i+1, -tau, work, 1, work( m+1 ), 1,
212 CALL dlarnv( 3, iseed, n-i+1, work )
213 wn = dnrm2( n-i+1, work, 1 )
214 wa = sign( wn, work( 1 ) )
215 IF( wn.EQ.zero )
THEN
219 CALL dscal( n-i, one / wb, work( 2 ), 1 )
226 CALL dgemv(
'No transpose', m-i+1, n-i+1, one, a( i, i ),
227 $ lda, work, 1, zero, work( n+1 ), 1 )
228 CALL dger( m-i+1, n-i+1, -tau, work( n+1 ), 1, work, 1,
236 DO 70 i = 1, max( m-1-kl, n-1-ku )
241 IF( i.LE.min( m-1-kl, n ) )
THEN
245 wn = dnrm2( m-kl-i+1, a( kl+i, i ), 1 )
246 wa = sign( wn, a( kl+i, i ) )
247 IF( wn.EQ.zero )
THEN
250 wb = a( kl+i, i ) + wa
251 CALL dscal( m-kl-i, one / wb, a( kl+i+1, i ), 1 )
258 CALL dgemv(
'Transpose', m-kl-i+1, n-i, one,
259 $ a( kl+i, i+1 ), lda, a( kl+i, i ), 1, zero,
261 CALL dger( m-kl-i+1, n-i, -tau, a( kl+i, i ), 1, work, 1,
262 $ a( kl+i, i+1 ), lda )
266 IF( i.LE.min( n-1-ku, m ) )
THEN
270 wn = dnrm2( n-ku-i+1, a( i, ku+i ), lda )
271 wa = sign( wn, a( i, ku+i ) )
272 IF( wn.EQ.zero )
THEN
275 wb = a( i, ku+i ) + wa
276 CALL dscal( n-ku-i, one / wb, a( i, ku+i+1 ), lda )
283 CALL dgemv(
'No transpose', m-i, n-ku-i+1, one,
284 $ a( i+1, ku+i ), lda, a( i, ku+i ), lda, zero,
286 CALL dger( m-i, n-ku-i+1, -tau, work, 1, a( i, ku+i ),
287 $ lda, a( i+1, ku+i ), lda )
295 IF( i.LE.min( n-1-ku, m ) )
THEN
299 wn = dnrm2( n-ku-i+1, a( i, ku+i ), lda )
300 wa = sign( wn, a( i, ku+i ) )
301 IF( wn.EQ.zero )
THEN
304 wb = a( i, ku+i ) + wa
305 CALL dscal( n-ku-i, one / wb, a( i, ku+i+1 ), lda )
312 CALL dgemv(
'No transpose', m-i, n-ku-i+1, one,
313 $ a( i+1, ku+i ), lda, a( i, ku+i ), lda, zero,
315 CALL dger( m-i, n-ku-i+1, -tau, work, 1, a( i, ku+i ),
316 $ lda, a( i+1, ku+i ), lda )
320 IF( i.LE.min( m-1-kl, n ) )
THEN
324 wn = dnrm2( m-kl-i+1, a( kl+i, i ), 1 )
325 wa = sign( wn, a( kl+i, i ) )
326 IF( wn.EQ.zero )
THEN
329 wb = a( kl+i, i ) + wa
330 CALL dscal( m-kl-i, one / wb, a( kl+i+1, i ), 1 )
337 CALL dgemv(
'Transpose', m-kl-i+1, n-i, one,
338 $ a( kl+i, i+1 ), lda, a( kl+i, i ), 1, zero,
340 CALL dger( m-kl-i+1, n-i, -tau, a( kl+i, i ), 1, work, 1,
341 $ a( kl+i, i+1 ), lda )
347 DO 50 j = kl + i + 1, m
353 DO 60 j = ku + i + 1, n
subroutine xerbla(srname, info)
subroutine dlagge(m, n, kl, ku, d, a, lda, iseed, work, info)
DLAGGE
subroutine dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DGEMV
subroutine dger(m, n, alpha, x, incx, y, incy, a, lda)
DGER
subroutine dlarnv(idist, iseed, n, x)
DLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine dscal(n, da, dx, incx)
DSCAL