170 SUBROUTINE sormlq( 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
196 INTEGER i, i1, i2, i3, ib, ic, iinfo, iws, jc, ldwork,
197 $ lwkopt, mi, nb, nbmin, ni, nq, nw
218 left =
lsame( side,
'L' )
219 notran =
lsame( trans,
'N' )
220 lquery = ( lwork.EQ.-1 )
231 IF( .NOT.left .AND. .NOT.
lsame( side,
'R' ) )
THEN
233 ELSE IF( .NOT.notran .AND. .NOT.
lsame( trans,
'T' ) )
THEN
235 ELSE IF( m.LT.0 )
THEN
237 ELSE IF( n.LT.0 )
THEN
239 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
241 ELSE IF( lda.LT.max( 1, k ) )
THEN
243 ELSE IF( ldc.LT.max( 1, m ) )
THEN
245 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
254 nb = min( nbmax,
ilaenv( 1,
'SORMLQ', side // trans, m, n, k,
256 lwkopt = max( 1, nw )*nb
261 CALL
xerbla(
'SORMLQ', -info )
263 ELSE IF( lquery )
THEN
269 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
THEN
276 IF( nb.GT.1 .AND. nb.LT.k )
THEN
278 IF( lwork.LT.iws )
THEN
280 nbmin = max( 2,
ilaenv( 2,
'SORMLQ', side // trans, m, n, k,
287 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
291 CALL
sorml2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
297 IF( ( left .AND. notran ) .OR.
298 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
303 i1 = ( ( k-1 ) / nb )*nb + 1
323 ib = min( nb, k-i+1 )
328 CALL
slarft(
'Forward',
'Rowwise', nq-i+1, ib, a( i, i ),
329 $ lda, tau( i ), t, ldt )
346 CALL
slarfb( side, transt,
'Forward',
'Rowwise', mi, ni, ib,
347 $ a( i, i ), lda, t, ldt, c( ic, jc ), ldc, work,