171 SUBROUTINE zunmtr( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
172 $ work, lwork, info )
180 CHARACTER side, trans, uplo
181 INTEGER info, lda, ldc, lwork, m, n
184 COMPLEX*16 a( lda, * ), c( ldc, * ), tau( * ), work( * )
190 LOGICAL left, lquery, upper
191 INTEGER i1, i2, iinfo, lwkopt, mi, nb, ni, nq, nw
209 left =
lsame( side,
'L' )
210 upper =
lsame( uplo,
'U' )
211 lquery = ( lwork.EQ.-1 )
222 IF( .NOT.left .AND. .NOT.
lsame( side,
'R' ) )
THEN
224 ELSE IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
226 ELSE IF( .NOT.
lsame( trans,
'N' ) .AND. .NOT.
lsame( trans,
'C' ) )
229 ELSE IF( m.LT.0 )
THEN
231 ELSE IF( n.LT.0 )
THEN
233 ELSE IF( lda.LT.max( 1, nq ) )
THEN
235 ELSE IF( ldc.LT.max( 1, m ) )
THEN
237 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
244 nb =
ilaenv( 1,
'ZUNMQL', side // trans, m-1, n, m-1,
247 nb =
ilaenv( 1,
'ZUNMQL', side // trans, m, n-1, n-1,
252 nb =
ilaenv( 1,
'ZUNMQR', side // trans, m-1, n, m-1,
255 nb =
ilaenv( 1,
'ZUNMQR', side // trans, m, n-1, n-1,
259 lwkopt = max( 1, nw )*nb
264 CALL
xerbla(
'ZUNMTR', -info )
266 ELSE IF( lquery )
THEN
272 IF( m.EQ.0 .OR. n.EQ.0 .OR. nq.EQ.1 )
THEN
289 CALL
zunmql( side, trans, mi, ni, nq-1, a( 1, 2 ), lda, tau, c,
290 $ ldc, work, lwork, iinfo )
302 CALL
zunmqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda, tau,
303 $ c( i1, i2 ), ldc, work, lwork, iinfo )