122 SUBROUTINE cgerqs( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
131 INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
134 COMPLEX A( lda, * ), B( ldb, * ), TAU( * ),
142 parameter ( czero = ( 0.0e+0, 0.0e+0 ),
143 $ cone = ( 1.0e+0, 0.0e+0 ) )
158 ELSE IF( n.LT.0 .OR. m.GT.n )
THEN
160 ELSE IF( nrhs.LT.0 )
THEN
162 ELSE IF( lda.LT.max( 1, m ) )
THEN
164 ELSE IF( ldb.LT.max( 1, n ) )
THEN
166 ELSE IF( lwork.LT.1 .OR. lwork.LT.nrhs .AND. m.GT.0 .AND. n.GT.0 )
171 CALL xerbla(
'CGERQS', -info )
177 IF( n.EQ.0 .OR. nrhs.EQ.0 .OR. m.EQ.0 )
182 CALL ctrsm(
'Left',
'Upper',
'No transpose',
'Non-unit', m, nrhs,
183 $ cone, a( 1, n-m+1 ), lda, b( n-m+1, 1 ), ldb )
187 CALL claset(
'Full', n-m, nrhs, czero, czero, b, ldb )
191 CALL cunmrq(
'Left',
'Conjugate transpose', n, nrhs, m, a, lda,
192 $ tau, b, ldb, work, lwork, info )
subroutine cgerqs(M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK, INFO)
CGERQS
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine cunmrq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
CUNMRQ
subroutine ctrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRSM
subroutine claset(UPLO, M, N, ALPHA, BETA, A, LDA)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...