163 SUBROUTINE dormql( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
164 $ WORK, LWORK, INFO )
171 CHARACTER SIDE, TRANS
172 INTEGER INFO, K, LDA, LDC, LWORK, M, N
175 DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
181 INTEGER NBMAX, LDT, TSIZE
182 parameter( nbmax = 64, ldt = nbmax+1,
183 $ tsize = ldt*nbmax )
186 LOGICAL LEFT, LQUERY, NOTRAN
187 INTEGER I, I1, I2, I3, IB, IINFO, IWT, LDWORK, LWKOPT,
188 $ mi, nb, nbmin, ni, nq, nw
193 EXTERNAL lsame, ilaenv
206 left = lsame( side,
'L' )
207 notran = lsame( trans,
'N' )
208 lquery = ( lwork.EQ.-1 )
219 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
221 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) )
THEN
223 ELSE IF( m.LT.0 )
THEN
225 ELSE IF( n.LT.0 )
THEN
227 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
229 ELSE IF( lda.LT.max( 1, nq ) )
THEN
231 ELSE IF( ldc.LT.max( 1, m ) )
THEN
233 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
241 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
244 nb = min( nbmax, ilaenv( 1,
'DORMQL', side // trans, m,
247 lwkopt = nw*nb + tsize
253 CALL xerbla(
'DORMQL', -info )
255 ELSE IF( lquery )
THEN
261 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
267 IF( nb.GT.1 .AND. nb.LT.k )
THEN
268 IF( lwork.LT.lwkopt )
THEN
269 nb = (lwork-tsize) / ldwork
270 nbmin = max( 2, ilaenv( 2,
'DORMQL', side // trans, m, n,
276 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
280 CALL dorm2l( side, trans, m, n, k, a, lda, tau, c, ldc,
288 IF( ( left .AND. notran ) .OR.
289 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
294 i1 = ( ( k-1 ) / nb )*nb + 1
306 ib = min( nb, k-i+1 )
311 CALL dlarft(
'Backward',
'Columnwise', nq-k+i+ib-1, ib,
312 $ a( 1, i ), lda, tau( i ), work( iwt ), ldt )
317 mi = m - k + i + ib - 1
322 ni = n - k + i + ib - 1
327 CALL dlarfb( side, trans,
'Backward',
'Columnwise', mi,
329 $ ib, a( 1, i ), lda, work( iwt ), ldt, c, ldc,
subroutine dlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
DLARFB applies a block reflector or its transpose to a general rectangular matrix.
recursive subroutine dlarft(direct, storev, n, k, v, ldv, tau, t, ldt)
DLARFT forms the triangular factor T of a block reflector H = I - vtvH
subroutine dorm2l(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
DORM2L multiplies a general matrix by the orthogonal matrix from a QL factorization determined by sge...
subroutine dormql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
DORMQL