126 SUBROUTINE zgeqrt2( M, N, A, LDA, T, LDT, INFO )
133 INTEGER INFO, LDA, LDT, M, N
136 COMPLEX*16 A( LDA, * ), T( LDT, * )
143 parameter( one = (1.0d+00,0.0d+00), zero = (0.0d+00,0.0d+00) )
147 COMPLEX*16 AII, ALPHA
159 ELSE IF( m.LT.n )
THEN
161 ELSE IF( lda.LT.max( 1, m ) )
THEN
163 ELSE IF( ldt.LT.max( 1, n ) )
THEN
167 CALL xerbla(
'ZGEQRT2', -info )
177 CALL zlarfg( m-i+1, a( i, i ), a( min( i+1, m ), i ), 1,
188 CALL zgemv(
'C',m-i+1, n-i, one, a( i, i+1 ), lda,
189 $ a( i, i ), 1, zero, t( 1, n ), 1 )
193 alpha = -conjg(t( i, 1 ))
194 CALL zgerc( m-i+1, n-i, alpha, a( i, i ), 1,
195 $ t( 1, n ), 1, a( i, i+1 ), lda )
207 CALL zgemv(
'C', m-i+1, i-1, alpha, a( i, 1 ), lda,
208 $ a( i, i ), 1, zero, t( 1, i ), 1 )
213 CALL ztrmv(
'U',
'N',
'N', i-1, t, ldt, t( 1, i ), 1 )
217 t( i, i ) = t( i, 1 )
subroutine xerbla(srname, info)
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
subroutine zgeqrt2(m, n, a, lda, t, ldt, info)
ZGEQRT2 computes a QR factorization of a general real or complex matrix using the compact WY represen...
subroutine zgerc(m, n, alpha, x, incx, y, incy, a, lda)
ZGERC
subroutine zlarfg(n, alpha, x, incx, tau)
ZLARFG generates an elementary reflector (Householder matrix).
subroutine ztrmv(uplo, trans, diag, n, a, lda, x, incx)
ZTRMV