119 SUBROUTINE cgelqs( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
127 INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
130 COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
138 parameter( czero = ( 0.0e+0, 0.0e+0 ),
139 $ cone = ( 1.0e+0, 0.0e+0 ) )
154 ELSE IF( n.LT.0 .OR. m.GT.n )
THEN
156 ELSE IF( nrhs.LT.0 )
THEN
158 ELSE IF( lda.LT.max( 1, m ) )
THEN
160 ELSE IF( ldb.LT.max( 1, n ) )
THEN
162 ELSE IF( lwork.LT.1 .OR. lwork.LT.nrhs .AND. m.GT.0 .AND. n.GT.0 )
167 CALL xerbla(
'CGELQS', -info )
173 IF( n.EQ.0 .OR. nrhs.EQ.0 .OR. m.EQ.0 )
178 CALL ctrsm(
'Left',
'Lower',
'No transpose',
'Non-unit', m, nrhs,
179 $ cone, a, lda, b, ldb )
184 $
CALL claset(
'Full', n-m, nrhs, czero, czero, b( m+1, 1 ),
189 CALL cunmlq(
'Left',
'Conjugate transpose', n, nrhs, m, a, lda,
190 $ tau, b, ldb, work, lwork, info )
subroutine xerbla(srname, info)
subroutine cgelqs(m, n, nrhs, a, lda, tau, b, ldb, work, lwork, info)
CGELQS
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 ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRSM
subroutine cunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
CUNMLQ