168 SUBROUTINE sormlq( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
169 $ work, lwork, info )
177 CHARACTER SIDE, TRANS
178 INTEGER INFO, K, LDA, LDC, LWORK, M, N
181 REAL A( lda, * ), C( ldc, * ), TAU( * ),
188 INTEGER NBMAX, LDT, TSIZE
189 parameter ( nbmax = 64, ldt = nbmax+1,
190 $ tsize = ldt*nbmax )
193 LOGICAL LEFT, LQUERY, NOTRAN
195 INTEGER I, I1, I2, I3, IB, IC, IINFO, IWT, JC, LDWORK,
196 $ lwkopt, mi, nb, nbmin, ni, nq, nw
201 EXTERNAL lsame, ilaenv
214 left = lsame( side,
'L' )
215 notran = lsame( trans,
'N' )
216 lquery = ( lwork.EQ.-1 )
227 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
229 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) )
THEN
231 ELSE IF( m.LT.0 )
THEN
233 ELSE IF( n.LT.0 )
THEN
235 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
237 ELSE IF( lda.LT.max( 1, k ) )
THEN
239 ELSE IF( ldc.LT.max( 1, m ) )
THEN
241 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
249 nb = min( nbmax, ilaenv( 1,
'SORMLQ', side // trans, m, n, k,
251 lwkopt = max( 1, nw )*nb + tsize
256 CALL xerbla(
'SORMLQ', -info )
258 ELSE IF( lquery )
THEN
264 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
THEN
271 IF( nb.GT.1 .AND. nb.LT.k )
THEN
272 IF( lwork.LT.nw*nb+tsize )
THEN
273 nb = (lwork-tsize) / ldwork
274 nbmin = max( 2, ilaenv( 2,
'SORMLQ', side // trans, m, n, k,
279 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
283 CALL sorml2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
290 IF( ( left .AND. notran ) .OR.
291 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
296 i1 = ( ( k-1 ) / nb )*nb + 1
316 ib = min( nb, k-i+1 )
321 CALL slarft(
'Forward',
'Rowwise', nq-i+1, ib, a( i, i ),
322 $ lda, tau( i ), work( iwt ), ldt )
339 CALL slarfb( side, transt,
'Forward',
'Rowwise', mi, ni, ib,
340 $ a( i, i ), lda, work( iwt ), ldt,
341 $ c( ic, jc ), ldc, work, ldwork )
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine slarft(DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT)
SLARFT forms the triangular factor T of a block reflector H = I - vtvH
subroutine sormlq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
SORMLQ
subroutine slarfb(SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV, T, LDT, C, LDC, WORK, LDWORK)
SLARFB applies a block reflector or its transpose to a general rectangular matrix.
subroutine sorml2(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, INFO)
SORML2 multiplies a general matrix by the orthogonal matrix from a LQ factorization determined by sge...