170 SUBROUTINE cunmql( 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 COMPLEX 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
199 COMPLEX t( ldt, nbmax )
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,
'C' ) )
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
254 nb = min( nbmax,
ilaenv( 1,
'CUNMQL', side // trans, m, n,
260 IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
266 CALL
xerbla(
'CUNMQL', -info )
268 ELSE IF( lquery )
THEN
274 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
280 IF( nb.GT.1 .AND. nb.LT.k )
THEN
282 IF( lwork.LT.iws )
THEN
284 nbmin = max( 2,
ilaenv( 2,
'CUNMQL', side // trans, m, n, k,
291 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
295 CALL
cunm2l( side, trans, m, n, k, a, lda, tau, c, ldc, work,
301 IF( ( left .AND. notran ) .OR.
302 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
307 i1 = ( ( k-1 ) / nb )*nb + 1
319 ib = min( nb, k-i+1 )
324 CALL
clarft(
'Backward',
'Columnwise', nq-k+i+ib-1, ib,
325 $ a( 1, i ), lda, tau( i ), t, ldt )
330 mi = m - k + i + ib - 1
335 ni = n - k + i + ib - 1
340 CALL
clarfb( side, trans,
'Backward',
'Columnwise', mi, ni,
341 $ ib, a( 1, i ), lda, t, ldt, c, ldc, work,