170 SUBROUTINE sormql( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
171 $ work, lwork, info )
179 CHARACTER side, trans
180 INTEGER info, k, lda, ldc, lwork, m, n
183 REAL a( lda, * ), c( ldc, * ), tau( * ),
191 parameter( nbmax = 64, ldt = nbmax+1 )
194 LOGICAL left, lquery, notran
195 INTEGER i, i1, i2, i3, ib, iinfo, iws, ldwork, lwkopt,
196 $ mi, nb, nbmin, ni, nq, nw
217 left =
lsame( side,
'L' )
218 notran =
lsame( trans,
'N' )
219 lquery = ( lwork.EQ.-1 )
230 IF( .NOT.left .AND. .NOT.
lsame( side,
'R' ) )
THEN
232 ELSE IF( .NOT.notran .AND. .NOT.
lsame( trans,
'T' ) )
THEN
234 ELSE IF( m.LT.0 )
THEN
236 ELSE IF( n.LT.0 )
THEN
238 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
240 ELSE IF( lda.LT.max( 1, nq ) )
THEN
242 ELSE IF( ldc.LT.max( 1, m ) )
THEN
247 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
255 nb = min( nbmax,
ilaenv( 1,
'SORMQL', side // trans, m, n,
261 IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
267 CALL
xerbla(
'SORMQL', -info )
269 ELSE IF( lquery )
THEN
275 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
281 IF( nb.GT.1 .AND. nb.LT.k )
THEN
283 IF( lwork.LT.iws )
THEN
285 nbmin = max( 2,
ilaenv( 2,
'SORMQL', side // trans, m, n, k,
292 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
296 CALL
sorm2l( side, trans, m, n, k, a, lda, tau, c, ldc, work,
302 IF( ( left .AND. notran ) .OR.
303 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
308 i1 = ( ( k-1 ) / nb )*nb + 1
320 ib = min( nb, k-i+1 )
325 CALL
slarft(
'Backward',
'Columnwise', nq-k+i+ib-1, ib,
326 $ a( 1, i ), lda, tau( i ), t, ldt )
331 mi = m - k + i + ib - 1
336 ni = n - k + i + ib - 1
341 CALL
slarfb( side, trans,
'Backward',
'Columnwise', mi, ni,
342 $ ib, a( 1, i ), lda, t, ldt, c, ldc, work,