195 SUBROUTINE dlatrd( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
203 INTEGER LDA, LDW, N, NB
206 DOUBLE PRECISION A( LDA, * ), E( * ), TAU( * ), W( LDW, * )
212 DOUBLE PRECISION ZERO, ONE, HALF
213 parameter( zero = 0.0d+0, one = 1.0d+0, half = 0.5d+0 )
217 DOUBLE PRECISION ALPHA
224 DOUBLE PRECISION DDOT
237 IF( lsame( uplo,
'U' ) )
THEN
241 DO 10 i = n, n - nb + 1, -1
247 CALL dgemv(
'No transpose', i, n-i, -one, a( 1, i+1 ),
248 $ lda, w( i, iw+1 ), ldw, one, a( 1, i ), 1 )
249 CALL dgemv(
'No transpose', i, n-i, -one, w( 1,
251 $ ldw, a( i, i+1 ), lda, one, a( 1, i ), 1 )
258 CALL dlarfg( i-1, a( i-1, i ), a( 1, i ), 1,
260 e( i-1 ) = a( i-1, i )
265 CALL dsymv(
'Upper', i-1, one, a, lda, a( 1, i ), 1,
266 $ zero, w( 1, iw ), 1 )
268 CALL dgemv(
'Transpose', i-1, n-i, one, w( 1,
270 $ ldw, a( 1, i ), 1, zero, w( i+1, iw ), 1 )
271 CALL dgemv(
'No transpose', i-1, n-i, -one,
272 $ a( 1, i+1 ), lda, w( i+1, iw ), 1, one,
274 CALL dgemv(
'Transpose', i-1, n-i, one, a( 1,
276 $ lda, a( 1, i ), 1, zero, w( i+1, iw ), 1 )
277 CALL dgemv(
'No transpose', i-1, n-i, -one,
278 $ w( 1, iw+1 ), ldw, w( i+1, iw ), 1, one,
281 CALL dscal( i-1, tau( i-1 ), w( 1, iw ), 1 )
282 alpha = -half*tau( i-1 )*ddot( i-1, w( 1, iw ), 1,
284 CALL daxpy( i-1, alpha, a( 1, i ), 1, w( 1, iw ), 1 )
296 CALL dgemv(
'No transpose', n-i+1, i-1, -one, a( i, 1 ),
297 $ lda, w( i, 1 ), ldw, one, a( i, i ), 1 )
298 CALL dgemv(
'No transpose', n-i+1, i-1, -one, w( i, 1 ),
299 $ ldw, a( i, 1 ), lda, one, a( i, i ), 1 )
305 CALL dlarfg( n-i, a( i+1, i ), a( min( i+2, n ), i ),
313 CALL dsymv(
'Lower', n-i, one, a( i+1, i+1 ), lda,
314 $ a( i+1, i ), 1, zero, w( i+1, i ), 1 )
315 CALL dgemv(
'Transpose', n-i, i-1, one, w( i+1, 1 ),
317 $ a( i+1, i ), 1, zero, w( 1, i ), 1 )
318 CALL dgemv(
'No transpose', n-i, i-1, -one, a( i+1,
320 $ lda, w( 1, i ), 1, one, w( i+1, i ), 1 )
321 CALL dgemv(
'Transpose', n-i, i-1, one, a( i+1, 1 ),
323 $ a( i+1, i ), 1, zero, w( 1, i ), 1 )
324 CALL dgemv(
'No transpose', n-i, i-1, -one, w( i+1,
326 $ ldw, w( 1, i ), 1, one, w( i+1, i ), 1 )
327 CALL dscal( n-i, tau( i ), w( i+1, i ), 1 )
328 alpha = -half*tau( i )*ddot( n-i, w( i+1, i ), 1,
330 CALL daxpy( n-i, alpha, a( i+1, i ), 1, w( i+1, i ),