121 SUBROUTINE cgelqs( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
130 INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
133 COMPLEX A( lda, * ), B( ldb, * ), TAU( * ),
141 parameter ( czero = ( 0.0e+0, 0.0e+0 ),
142 $ cone = ( 1.0e+0, 0.0e+0 ) )
157 ELSE IF( n.LT.0 .OR. m.GT.n )
THEN
159 ELSE IF( nrhs.LT.0 )
THEN
161 ELSE IF( lda.LT.max( 1, m ) )
THEN
163 ELSE IF( ldb.LT.max( 1, n ) )
THEN
165 ELSE IF( lwork.LT.1 .OR. lwork.LT.nrhs .AND. m.GT.0 .AND. n.GT.0 )
170 CALL xerbla(
'CGELQS', -info )
176 IF( n.EQ.0 .OR. nrhs.EQ.0 .OR. m.EQ.0 )
181 CALL ctrsm(
'Left',
'Lower',
'No transpose',
'Non-unit', m, nrhs,
182 $ cone, a, lda, b, ldb )
187 $
CALL claset(
'Full', n-m, nrhs, czero, czero, b( m+1, 1 ),
192 CALL cunmlq(
'Left',
'Conjugate transpose', n, nrhs, m, a, lda,
193 $ tau, b, ldb, work, lwork, info )
subroutine xerbla(SRNAME, INFO)
XERBLA
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...
subroutine cgelqs(M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK, INFO)
CGELQS
subroutine cunmlq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
CUNMLQ