119 SUBROUTINE dgelqs( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
127 INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
130 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
137 DOUBLE PRECISION ZERO, ONE
138 parameter( zero = 0.0d+0, one = 1.0d+0 )
153 ELSE IF( n.LT.0 .OR. m.GT.n )
THEN
155 ELSE IF( nrhs.LT.0 )
THEN
157 ELSE IF( lda.LT.max( 1, m ) )
THEN
159 ELSE IF( ldb.LT.max( 1, n ) )
THEN
161 ELSE IF( lwork.LT.1 .OR. lwork.LT.nrhs .AND. m.GT.0 .AND. n.GT.0 )
166 CALL xerbla(
'DGELQS', -info )
172 IF( n.EQ.0 .OR. nrhs.EQ.0 .OR. m.EQ.0 )
177 CALL dtrsm(
'Left',
'Lower',
'No transpose',
'Non-unit', m, nrhs,
178 $ one, a, lda, b, ldb )
183 $
CALL dlaset(
'Full', n-m, nrhs, zero, zero, b( m+1, 1 ), ldb )
187 CALL dormlq(
'Left',
'Transpose', n, nrhs, m, a, lda, tau, b, ldb,
188 $ work, lwork, info )
subroutine xerbla(srname, info)
subroutine dgelqs(m, n, nrhs, a, lda, tau, b, ldb, work, lwork, info)
DGELQS
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRSM
subroutine dormlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
DORMLQ