114 SUBROUTINE cungl2( M, N, K, A, LDA, TAU, WORK, INFO )
122 INTEGER INFO, K, LDA, M, N
125 COMPLEX A( lda, * ), TAU( * ), WORK( * )
132 parameter ( one = ( 1.0e+0, 0.0e+0 ),
133 $ zero = ( 0.0e+0, 0.0e+0 ) )
151 ELSE IF( n.LT.m )
THEN
153 ELSE IF( k.LT.0 .OR. k.GT.m )
THEN
155 ELSE IF( lda.LT.max( 1, m ) )
THEN
159 CALL xerbla(
'CUNGL2', -info )
176 IF( j.GT.k .AND. j.LE.m )
186 CALL clacgv( n-i, a( i, i+1 ), lda )
189 CALL clarf(
'Right', m-i, n-i+1, a( i, i ), lda,
190 $ conjg( tau( i ) ), a( i+1, i ), lda, work )
192 CALL cscal( n-i, -tau( i ), a( i, i+1 ), lda )
193 CALL clacgv( n-i, a( i, i+1 ), lda )
195 a( i, i ) = one - conjg( tau( i ) )
subroutine cungl2(M, N, K, A, LDA, TAU, WORK, INFO)
CUNGL2 generates all or part of the unitary matrix Q from an LQ factorization determined by cgelqf (u...
subroutine cscal(N, CA, CX, INCX)
CSCAL
subroutine xerbla(SRNAME, INFO)
XERBLA
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.