198 SUBROUTINE zlatrd( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
206 INTEGER LDA, LDW, N, NB
209 DOUBLE PRECISION E( * )
210 COMPLEX*16 A( LDA, * ), TAU( * ), W( LDW, * )
216 COMPLEX*16 ZERO, ONE, HALF
217 parameter( zero = ( 0.0d+0, 0.0d+0 ),
218 $ one = ( 1.0d+0, 0.0d+0 ),
219 $ half = ( 0.5d+0, 0.0d+0 ) )
231 EXTERNAL lsame, zdotc
243 IF( lsame( uplo,
'U' ) )
THEN
247 DO 10 i = n, n - nb + 1, -1
253 a( i, i ) = dble( a( i, i ) )
254 CALL zlacgv( n-i, w( i, iw+1 ), ldw )
255 CALL zgemv(
'No transpose', i, n-i, -one, a( 1, i+1 ),
256 $ lda, w( i, iw+1 ), ldw, one, a( 1, i ), 1 )
257 CALL zlacgv( n-i, w( i, iw+1 ), ldw )
258 CALL zlacgv( n-i, a( i, i+1 ), lda )
259 CALL zgemv(
'No transpose', i, n-i, -one, w( 1, iw+1 ),
260 $ ldw, a( i, i+1 ), lda, one, a( 1, i ), 1 )
261 CALL zlacgv( n-i, a( i, i+1 ), lda )
262 a( i, i ) = dble( a( i, i ) )
270 CALL zlarfg( i-1, alpha, a( 1, i ), 1, tau( i-1 ) )
271 e( i-1 ) = dble( alpha )
276 CALL zhemv(
'Upper', i-1, one, a, lda, a( 1, i ), 1,
277 $ zero, w( 1, iw ), 1 )
279 CALL zgemv(
'Conjugate transpose', i-1, n-i, one,
280 $ w( 1, iw+1 ), ldw, a( 1, i ), 1, zero,
282 CALL zgemv(
'No transpose', i-1, n-i, -one,
283 $ a( 1, i+1 ), lda, w( i+1, iw ), 1, one,
285 CALL zgemv(
'Conjugate transpose', i-1, n-i, one,
286 $ a( 1, i+1 ), lda, a( 1, i ), 1, zero,
288 CALL zgemv(
'No transpose', i-1, n-i, -one,
289 $ w( 1, iw+1 ), ldw, w( i+1, iw ), 1, one,
292 CALL zscal( i-1, tau( i-1 ), w( 1, iw ), 1 )
293 alpha = -half*tau( i-1 )*zdotc( i-1, w( 1, iw ), 1,
295 CALL zaxpy( i-1, alpha, a( 1, i ), 1, w( 1, iw ), 1 )
307 a( i, i ) = dble( a( i, i ) )
308 CALL zlacgv( i-1, w( i, 1 ), ldw )
309 CALL zgemv(
'No transpose', n-i+1, i-1, -one, a( i, 1 ),
310 $ lda, w( i, 1 ), ldw, one, a( i, i ), 1 )
311 CALL zlacgv( i-1, w( i, 1 ), ldw )
312 CALL zlacgv( i-1, a( i, 1 ), lda )
313 CALL zgemv(
'No transpose', n-i+1, i-1, -one, w( i, 1 ),
314 $ ldw, a( i, 1 ), lda, one, a( i, i ), 1 )
315 CALL zlacgv( i-1, a( i, 1 ), lda )
316 a( i, i ) = dble( a( i, i ) )
323 CALL zlarfg( n-i, alpha, a( min( i+2, n ), i ), 1,
325 e( i ) = dble( alpha )
330 CALL zhemv(
'Lower', n-i, one, a( i+1, i+1 ), lda,
331 $ a( i+1, i ), 1, zero, w( i+1, i ), 1 )
332 CALL zgemv(
'Conjugate transpose', n-i, i-1, one,
333 $ w( i+1, 1 ), ldw, a( i+1, i ), 1, zero,
335 CALL zgemv(
'No transpose', n-i, i-1, -one, a( i+1, 1 ),
336 $ lda, w( 1, i ), 1, one, w( i+1, i ), 1 )
337 CALL zgemv(
'Conjugate transpose', n-i, i-1, one,
338 $ a( i+1, 1 ), lda, a( i+1, i ), 1, zero,
340 CALL zgemv(
'No transpose', n-i, i-1, -one, w( i+1, 1 ),
341 $ ldw, w( 1, i ), 1, one, w( i+1, i ), 1 )
342 CALL zscal( n-i, tau( i ), w( i+1, i ), 1 )
343 alpha = -half*tau( i )*zdotc( n-i, w( i+1, i ), 1,
345 CALL zaxpy( n-i, alpha, a( i+1, i ), 1, w( i+1, i ), 1 )
subroutine zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
subroutine zhemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
ZHEMV
subroutine zlacgv(n, x, incx)
ZLACGV conjugates a complex vector.
subroutine zlarfg(n, alpha, x, incx, tau)
ZLARFG generates an elementary reflector (Householder matrix).
subroutine zlatrd(uplo, n, nb, a, lda, e, tau, w, ldw)
ZLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal fo...
subroutine zscal(n, za, zx, incx)
ZSCAL