169 SUBROUTINE zunmlq( 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 COMPLEX*16 a( lda, * ), c( ldc, * ), tau( * ), work( * )
189 parameter( nbmax = 64, ldt = nbmax+1 )
192 LOGICAL left, lquery, notran
194 INTEGER i, i1, i2, i3, ib, ic, iinfo, iws, jc, ldwork,
195 $ lwkopt, mi, nb, nbmin, ni, nq, nw
198 COMPLEX*16 t( ldt, nbmax )
216 left =
lsame( side,
'L' )
217 notran =
lsame( trans,
'N' )
218 lquery = ( lwork.EQ.-1 )
229 IF( .NOT.left .AND. .NOT.
lsame( side,
'R' ) )
THEN
231 ELSE IF( .NOT.notran .AND. .NOT.
lsame( trans,
'C' ) )
THEN
233 ELSE IF( m.LT.0 )
THEN
235 ELSE IF( n.LT.0 )
THEN
237 ELSE IF( k.LT.0 .OR. k.GT.nq )
THEN
239 ELSE IF( lda.LT.max( 1, k ) )
THEN
241 ELSE IF( ldc.LT.max( 1, m ) )
THEN
243 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
252 nb = min( nbmax,
ilaenv( 1,
'ZUNMLQ', side // trans, m, n, k,
254 lwkopt = max( 1, nw )*nb
259 CALL
xerbla(
'ZUNMLQ', -info )
261 ELSE IF( lquery )
THEN
267 IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 )
THEN
274 IF( nb.GT.1 .AND. nb.LT.k )
THEN
276 IF( lwork.LT.iws )
THEN
278 nbmin = max( 2,
ilaenv( 2,
'ZUNMLQ', side // trans, m, n, k,
285 IF( nb.LT.nbmin .OR. nb.GE.k )
THEN
289 CALL
zunml2( side, trans, m, n, k, a, lda, tau, c, ldc, work,
295 IF( ( left .AND. notran ) .OR.
296 $ ( .NOT.left .AND. .NOT.notran ) )
THEN
301 i1 = ( ( k-1 ) / nb )*nb + 1
321 ib = min( nb, k-i+1 )
326 CALL
zlarft(
'Forward',
'Rowwise', nq-i+1, ib, a( i, i ),
327 $ lda, tau( i ), t, ldt )
344 CALL
zlarfb( side, transt,
'Forward',
'Rowwise', mi, ni, ib,
345 $ a( i, i ), lda, t, ldt, c( ic, jc ), ldc, work,