197 SUBROUTINE cunmbr( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
198 $ ldc, work, lwork, info )
206 CHARACTER SIDE, TRANS, VECT
207 INTEGER INFO, K, LDA, LDC, LWORK, M, N
210 COMPLEX A( lda, * ), C( ldc, * ), TAU( * ),
217 LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN
219 INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
224 EXTERNAL ilaenv, lsame
237 applyq = lsame( vect,
'Q' )
238 left = lsame( side,
'L' )
239 notran = lsame( trans,
'N' )
240 lquery = ( lwork.EQ.-1 )
251 IF( m.EQ.0 .OR. n.EQ.0 )
THEN
254 IF( .NOT.applyq .AND. .NOT.lsame( vect,
'P' ) )
THEN
256 ELSE IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
258 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'C' ) )
THEN
260 ELSE IF( m.LT.0 )
THEN
262 ELSE IF( n.LT.0 )
THEN
264 ELSE IF( k.LT.0 )
THEN
266 ELSE IF( ( applyq .AND. lda.LT.max( 1, nq ) ) .OR.
267 $ ( .NOT.applyq .AND. lda.LT.max( 1, min( nq, k ) ) ) )
270 ELSE IF( ldc.LT.max( 1, m ) )
THEN
272 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
280 nb = ilaenv( 1,
'CUNMQR', side // trans, m-1, n, m-1,
283 nb = ilaenv( 1,
'CUNMQR', side // trans, m, n-1, n-1,
288 nb = ilaenv( 1,
'CUNMLQ', side // trans, m-1, n, m-1,
291 nb = ilaenv( 1,
'CUNMLQ', side // trans, m, n-1, n-1,
295 lwkopt = max( 1, nw*nb )
303 CALL xerbla(
'CUNMBR', -info )
305 ELSE IF( lquery )
THEN
311 IF( m.EQ.0 .OR. n.EQ.0 )
322 CALL cunmqr( side, trans, m, n, k, a, lda, tau, c, ldc,
323 $ work, lwork, iinfo )
324 ELSE IF( nq.GT.1 )
THEN
339 CALL cunmqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda, tau,
340 $ c( i1, i2 ), ldc, work, lwork, iinfo )
355 CALL cunmlq( side, transt, m, n, k, a, lda, tau, c, ldc,
356 $ work, lwork, iinfo )
357 ELSE IF( nq.GT.1 )
THEN
372 CALL cunmlq( side, transt, mi, ni, nq-1, a( 1, 2 ), lda,
373 $ tau, c( i1, i2 ), ldc, work, lwork, iinfo )
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine cunmqr(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
CUNMQR
subroutine cunmbr(VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
CUNMBR
subroutine cunmlq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
CUNMLQ