115 SUBROUTINE cungr2( M, N, K, A, LDA, TAU, WORK, INFO )
123 INTEGER INFO, K, LDA, M, N
126 COMPLEX A( lda, * ), TAU( * ), WORK( * )
133 parameter ( one = ( 1.0e+0, 0.0e+0 ),
134 $ zero = ( 0.0e+0, 0.0e+0 ) )
152 ELSE IF( n.LT.m )
THEN
154 ELSE IF( k.LT.0 .OR. k.GT.m )
THEN
156 ELSE IF( lda.LT.max( 1, m ) )
THEN
160 CALL xerbla(
'CUNGR2', -info )
177 IF( j.GT.n-m .AND. j.LE.n-k )
178 $ a( m-n+j, j ) = one
187 CALL clacgv( n-m+ii-1, a( ii, 1 ), lda )
188 a( ii, n-m+ii ) = one
189 CALL clarf(
'Right', ii-1, n-m+ii, a( ii, 1 ), lda,
190 $ conjg( tau( i ) ), a, lda, work )
191 CALL cscal( n-m+ii-1, -tau( i ), a( ii, 1 ), lda )
192 CALL clacgv( n-m+ii-1, a( ii, 1 ), lda )
193 a( ii, n-m+ii ) = one - conjg( tau( i ) )
197 DO 30 l = n - m + ii + 1, n
subroutine cscal(N, CA, CX, INCX)
CSCAL
subroutine xerbla(SRNAME, INFO)
XERBLA
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...
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.