121 SUBROUTINE sgelqs( 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 ( zero = 0.0e+0, one = 1.0e+0 )
156 ELSE IF( n.LT.0 .OR. m.GT.n )
THEN
158 ELSE IF( nrhs.LT.0 )
THEN
160 ELSE IF( lda.LT.max( 1, m ) )
THEN
162 ELSE IF( ldb.LT.max( 1, n ) )
THEN
164 ELSE IF( lwork.LT.1 .OR. lwork.LT.nrhs .AND. m.GT.0 .AND. n.GT.0 )
169 CALL xerbla(
'SGELQS', -info )
175 IF( n.EQ.0 .OR. nrhs.EQ.0 .OR. m.EQ.0 )
180 CALL strsm(
'Left',
'Lower',
'No transpose',
'Non-unit', m, nrhs,
181 $ one, a, lda, b, ldb )
186 $
CALL slaset(
'Full', n-m, nrhs, zero, zero, b( m+1, 1 ), ldb )
190 CALL sormlq(
'Left',
'Transpose', n, nrhs, m, a, lda, tau, b, ldb,
191 $ work, lwork, info )
subroutine sgelqs(M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK, INFO)
SGELQS
subroutine strsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
STRSM
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine slaset(UPLO, M, N, ALPHA, BETA, A, LDA)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine sormlq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
SORMLQ