113 SUBROUTINE cungr2( M, N, K, A, LDA, TAU, WORK, INFO )
120 INTEGER INFO, K, LDA, M, N
123 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
130 parameter( one = ( 1.0e+0, 0.0e+0 ),
131 $ zero = ( 0.0e+0, 0.0e+0 ) )
149 ELSE IF( n.LT.m )
THEN
151 ELSE IF( k.LT.0 .OR. k.GT.m )
THEN
153 ELSE IF( lda.LT.max( 1, m ) )
THEN
157 CALL xerbla(
'CUNGR2', -info )
174 IF( j.GT.n-m .AND. j.LE.n-k )
175 $ a( m-n+j, j ) = one
184 CALL clacgv( n-m+ii-1, a( ii, 1 ), lda )
185 a( ii, n-m+ii ) = one
186 CALL clarf(
'Right', ii-1, n-m+ii, a( ii, 1 ), lda,
187 $ conjg( tau( i ) ), a, lda, work )
188 CALL cscal( n-m+ii-1, -tau( i ), a( ii, 1 ), lda )
189 CALL clacgv( n-m+ii-1, a( ii, 1 ), lda )
190 a( ii, n-m+ii ) = one - conjg( tau( i ) )
194 DO 30 l = n - m + ii + 1, n
subroutine xerbla(srname, info)
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 cscal(n, ca, cx, incx)
CSCAL
subroutine cungr2(m, n, k, a, lda, tau, work, info)
CUNGR2 generates all or part of the unitary matrix Q from an RQ factorization determined by cgerqf (u...