172 SUBROUTINE cunmtr( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
173 $ work, lwork, info )
181 CHARACTER side, trans, uplo
182 INTEGER info, lda, ldc, lwork, m, n
185 COMPLEX a( lda, * ), c( ldc, * ), tau( * ),
192 LOGICAL left, lquery, upper
193 INTEGER i1, i2, iinfo, lwkopt, mi, nb, ni, nq, nw
211 left =
lsame( side,
'L' )
212 upper =
lsame( uplo,
'U' )
213 lquery = ( lwork.EQ.-1 )
224 IF( .NOT.left .AND. .NOT.
lsame( side,
'R' ) )
THEN
226 ELSE IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
228 ELSE IF( .NOT.
lsame( trans,
'N' ) .AND. .NOT.
lsame( trans,
'C' ) )
231 ELSE IF( m.LT.0 )
THEN
233 ELSE IF( n.LT.0 )
THEN
235 ELSE IF( lda.LT.max( 1, nq ) )
THEN
237 ELSE IF( ldc.LT.max( 1, m ) )
THEN
239 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
246 nb =
ilaenv( 1,
'CUNMQL', side // trans, m-1, n, m-1,
249 nb =
ilaenv( 1,
'CUNMQL', side // trans, m, n-1, n-1,
254 nb =
ilaenv( 1,
'CUNMQR', side // trans, m-1, n, m-1,
257 nb =
ilaenv( 1,
'CUNMQR', side // trans, m, n-1, n-1,
261 lwkopt = max( 1, nw )*nb
266 CALL
xerbla(
'CUNMTR', -info )
268 ELSE IF( lquery )
THEN
274 IF( m.EQ.0 .OR. n.EQ.0 .OR. nq.EQ.1 )
THEN
291 CALL
cunmql( side, trans, mi, ni, nq-1, a( 1, 2 ), lda, tau, c,
292 $ ldc, work, lwork, iinfo )
304 CALL
cunmqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda, tau,
305 $ c( i1, i2 ), ldc, work, lwork, iinfo )