121 SUBROUTINE sgeqrs( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
130 INTEGER info, lda, ldb, lwork, m, n, nrhs
133 REAL a( lda, * ), b( ldb, * ), tau( * ),
141 parameter( one = 1.0e+0 )
156 ELSE IF( n.LT.0 .OR. n.GT.m )
THEN
158 ELSE IF( nrhs.LT.0 )
THEN
160 ELSE IF( lda.LT.max( 1, m ) )
THEN
162 ELSE IF( ldb.LT.max( 1, m ) )
THEN
164 ELSE IF( lwork.LT.1 .OR. lwork.LT.nrhs .AND. m.GT.0 .AND. n.GT.0 )
169 CALL
xerbla(
'SGEQRS', -info )
175 IF( n.EQ.0 .OR. nrhs.EQ.0 .OR. m.EQ.0 )
180 CALL
sormqr(
'Left',
'Transpose', m, nrhs, n, a, lda, tau, b, ldb,
181 $ work, lwork, info )
185 CALL
strsm(
'Left',
'Upper',
'No transpose',
'Non-unit', n, nrhs,
186 $ one, a, lda, b, ldb )