169 SUBROUTINE dormql( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
170 $ work, lwork, info )
178 CHARACTER side, trans
179 INTEGER info, k, lda, ldc, lwork, m, n
182 DOUBLE PRECISION a( lda, * ), c( ldc, * ), tau( * ), work( * )
189 parameter( nbmax = 64, ldt = nbmax+1 )
192 LOGICAL left, lquery, notran
193 INTEGER i, i1, i2, i3, ib, iinfo, iws, ldwork, lwkopt,
194 $ mi, nb, nbmin, ni, nq, nw
197 DOUBLE PRECISION t( ldt, nbmax )
215 left =
lsame( side,
'L' )
216 notran =
lsame( trans,
'N' )
217 lquery = ( lwork.EQ.-1 )
228 IF( .NOT.left .AND. .NOT.
lsame( side,
'R' ) )
THEN
230 ELSE IF( .NOT.notran .AND. .NOT.
lsame( trans,
'T' ) )
THEN
232 ELSE IF( m.LT.0 )
THEN
234 ELSE IF( n.LT.0 )
THEN
236 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
238 ELSE IF( lda.LT.max( 1, nq ) )
THEN
240 ELSE IF( ldc.LT.max( 1, m ) )
THEN
245 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
252 nb = min( nbmax,
ilaenv( 1,
'DORMQL', side // trans, m, n,
258 IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
264 CALL
xerbla(
'DORMQL', -info )
266 ELSE IF( lquery )
THEN
272 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
278 IF( nb.GT.1 .AND. nb.LT.k )
THEN
280 IF( lwork.LT.iws )
THEN
282 nbmin = max( 2,
ilaenv( 2,
'DORMQL', side // trans, m, n, k,
289 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
293 CALL
dorm2l( side, trans, m, n, k, a, lda, tau, c, ldc, work,
299 IF( ( left .AND. notran ) .OR.
300 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
305 i1 = ( ( k-1 ) / nb )*nb + 1
317 ib = min( nb, k-i+1 )
322 CALL
dlarft(
'Backward',
'Columnwise', nq-k+i+ib-1, ib,
323 $ a( 1, i ), lda, tau( i ), t, ldt )
328 mi = m - k + i + ib - 1
333 ni = n - k + i + ib - 1
338 CALL
dlarfb( side, trans,
'Backward',
'Columnwise', mi, ni,
339 $ ib, a( 1, i ), lda, t, ldt, c, ldc, work,