122 SUBROUTINE cgerq2( M, N, A, LDA, TAU, WORK, INFO )
129 INTEGER INFO, LDA, M, N
132 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
139 parameter( one = ( 1.0e+0, 0.0e+0 ) )
158 ELSE IF( n.LT.0 )
THEN
160 ELSE IF( lda.LT.max( 1, m ) )
THEN
164 CALL xerbla(
'CGERQ2', -info )
175 CALL clacgv( n-k+i, a( m-k+i, 1 ), lda )
176 alpha = a( m-k+i, n-k+i )
177 CALL clarfg( n-k+i, alpha, a( m-k+i, 1 ), lda,
182 a( m-k+i, n-k+i ) = one
183 CALL clarf(
'Right', m-k+i-1, n-k+i, a( m-k+i, 1 ), lda,
184 $ tau( i ), a, lda, work )
185 a( m-k+i, n-k+i ) = alpha
186 CALL clacgv( n-k+i-1, a( m-k+i, 1 ), lda )
subroutine xerbla(srname, info)
subroutine cgerq2(m, n, a, lda, tau, work, info)
CGERQ2 computes the RQ factorization of a general rectangular matrix using an unblocked algorithm.
subroutine clacgv(n, x, incx)
CLACGV conjugates a complex vector.
subroutine clarf(side, m, n, v, incv, tau, c, ldc, work)
CLARF applies an elementary reflector to a general rectangular matrix.
subroutine clarfg(n, alpha, x, incx, tau)
CLARFG generates an elementary reflector (Householder matrix).