120 SUBROUTINE zgerqs( 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( * ),
138 COMPLEX*16 CZERO, CONE
139 parameter( czero = ( 0.0d+0, 0.0d+0 ),
140 $ cone = ( 1.0d+0, 0.0d+0 ) )
155 ELSE IF( n.LT.0 .OR. m.GT.n )
THEN
157 ELSE IF( nrhs.LT.0 )
THEN
159 ELSE IF( lda.LT.max( 1, m ) )
THEN
161 ELSE IF( ldb.LT.max( 1, n ) )
THEN
163 ELSE IF( lwork.LT.1 .OR. lwork.LT.nrhs .AND. m.GT.0 .AND. n.GT.0 )
168 CALL xerbla(
'ZGERQS', -info )
174 IF( n.EQ.0 .OR. nrhs.EQ.0 .OR. m.EQ.0 )
179 CALL ztrsm(
'Left',
'Upper',
'No transpose',
'Non-unit', m, nrhs,
180 $ cone, a( 1, n-m+1 ), lda, b( n-m+1, 1 ), ldb )
184 CALL zlaset(
'Full', n-m, nrhs, czero, czero, b, ldb )
188 CALL zunmrq(
'Left',
'Conjugate transpose', n, nrhs, m, a, lda,
189 $ tau, b, ldb, work, lwork, info )
subroutine xerbla(srname, info)
subroutine zlaset(uplo, m, n, alpha, beta, a, lda)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRSM
subroutine zunmrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
ZUNMRQ
subroutine zgerqs(m, n, nrhs, a, lda, tau, b, ldb, work, lwork, info)
ZGERQS