120 SUBROUTINE zgeqls( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
128 INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
131 COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
139 parameter( one = ( 1.0d+0, 0.0d+0 ) )
154 ELSE IF( n.LT.0 .OR. n.GT.m )
THEN
156 ELSE IF( nrhs.LT.0 )
THEN
158 ELSE IF( lda.LT.max( 1, m ) )
THEN
160 ELSE IF( ldb.LT.max( 1, m ) )
THEN
162 ELSE IF( lwork.LT.1 .OR. lwork.LT.nrhs .AND. m.GT.0 .AND. n.GT.0 )
167 CALL xerbla(
'ZGEQLS', -info )
173 IF( n.EQ.0 .OR. nrhs.EQ.0 .OR. m.EQ.0 )
178 CALL zunmql(
'Left',
'Conjugate transpose', m, nrhs, n, a, lda,
179 $ tau, b, ldb, work, lwork, info )
183 CALL ztrsm(
'Left',
'Lower',
'No transpose',
'Non-unit', n, nrhs,
184 $ one, a( m-n+1, 1 ), lda, b( m-n+1, 1 ), ldb )
subroutine xerbla(srname, info)
subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRSM
subroutine zunmql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
ZUNMQL
subroutine zgeqls(m, n, nrhs, a, lda, tau, b, ldb, work, lwork, info)
ZGEQLS