164 SUBROUTINE sormrq( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
165 $ WORK, LWORK, INFO )
172 CHARACTER SIDE, TRANS
173 INTEGER INFO, K, LDA, LDC, LWORK, M, N
176 REAL A( LDA, * ), C( LDC, * ), TAU( * ),
183 INTEGER NBMAX, LDT, TSIZE
184 parameter( nbmax = 64, ldt = nbmax+1,
185 $ tsize = ldt*nbmax )
188 LOGICAL LEFT, LQUERY, NOTRAN
190 INTEGER I, I1, I2, I3, IB, IINFO, IWT, LDWORK, LWKOPT,
191 $ mi, nb, nbmin, ni, nq, nw
197 EXTERNAL lsame, ilaenv, sroundup_lwork
210 left = lsame( side,
'L' )
211 notran = lsame( trans,
'N' )
212 lquery = ( lwork.EQ.-1 )
223 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
225 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) )
THEN
227 ELSE IF( m.LT.0 )
THEN
229 ELSE IF( n.LT.0 )
THEN
231 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
233 ELSE IF( lda.LT.max( 1, k ) )
THEN
235 ELSE IF( ldc.LT.max( 1, m ) )
THEN
237 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
245 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
248 nb = min( nbmax, ilaenv( 1,
'SORMRQ', side // trans, m,
251 lwkopt = nw*nb + tsize
253 work( 1 ) = sroundup_lwork(lwkopt)
257 CALL xerbla(
'SORMRQ', -info )
259 ELSE IF( lquery )
THEN
265 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
271 IF( nb.GT.1 .AND. nb.LT.k )
THEN
272 IF( lwork.LT.lwkopt )
THEN
273 nb = (lwork-tsize) / ldwork
274 nbmin = max( 2, ilaenv( 2,
'SORMRQ', side // trans, m, n,
280 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
284 CALL sormr2( side, trans, m, n, k, a, lda, tau, c, ldc,
292 IF( ( left .AND. .NOT.notran ) .OR.
293 $ ( .NOT.left .AND. notran ) )
THEN
298 i1 = ( ( k-1 ) / nb )*nb + 1
316 ib = min( nb, k-i+1 )
321 CALL slarft(
'Backward',
'Rowwise', nq-k+i+ib-1, ib,
322 $ a( i, 1 ), lda, tau( i ), work( iwt ), ldt )
327 mi = m - k + i + ib - 1
332 ni = n - k + i + ib - 1
337 CALL slarfb( side, transt,
'Backward',
'Rowwise', mi, ni,
338 $ ib, a( i, 1 ), lda, work( iwt ), ldt, c, ldc,
342 work( 1 ) = sroundup_lwork(lwkopt)
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.
recursive 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 sormr2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
SORMR2 multiplies a general matrix by the orthogonal matrix from a RQ factorization determined by sge...
subroutine sormrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
SORMRQ