195 SUBROUTINE cunmbr( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
196 $ LDC, WORK, LWORK, INFO )
203 CHARACTER SIDE, TRANS, VECT
204 INTEGER INFO, K, LDA, LDC, LWORK, M, N
207 COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
214 LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN
216 INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
222 EXTERNAL ilaenv, lsame, sroundup_lwork
235 applyq = lsame( vect,
'Q' )
236 left = lsame( side,
'L' )
237 notran = lsame( trans,
'N' )
238 lquery = ( lwork.EQ.-1 )
249 IF( .NOT.applyq .AND. .NOT.lsame( vect,
'P' ) )
THEN
251 ELSE IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
253 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'C' ) )
THEN
255 ELSE IF( m.LT.0 )
THEN
257 ELSE IF( n.LT.0 )
THEN
259 ELSE IF( k.LT.0 )
THEN
261 ELSE IF( ( applyq .AND. lda.LT.max( 1, nq ) ) .OR.
262 $ ( .NOT.applyq .AND. lda.LT.max( 1, min( nq, k ) ) ) )
265 ELSE IF( ldc.LT.max( 1, m ) )
THEN
267 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
272 IF( m.GT.0 .AND. n.GT.0 )
THEN
275 nb = ilaenv( 1,
'CUNMQR', side // trans, m-1, n, m-1,
278 nb = ilaenv( 1,
'CUNMQR', side // trans, m, n-1, n-1,
283 nb = ilaenv( 1,
'CUNMLQ', side // trans, m-1, n, m-1,
286 nb = ilaenv( 1,
'CUNMLQ', side // trans, m, n-1, n-1,
294 work( 1 ) = sroundup_lwork(lwkopt)
298 CALL xerbla(
'CUNMBR', -info )
300 ELSE IF( lquery )
THEN
306 IF( m.EQ.0 .OR. n.EQ.0 )
317 CALL cunmqr( side, trans, m, n, k, a, lda, tau, c, ldc,
318 $ work, lwork, iinfo )
319 ELSE IF( nq.GT.1 )
THEN
334 CALL cunmqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda, tau,
335 $ c( i1, i2 ), ldc, work, lwork, iinfo )
350 CALL cunmlq( side, transt, m, n, k, a, lda, tau, c, ldc,
351 $ work, lwork, iinfo )
352 ELSE IF( nq.GT.1 )
THEN
367 CALL cunmlq( side, transt, mi, ni, nq-1, a( 1, 2 ), lda,
368 $ tau, c( i1, i2 ), ldc, work, lwork, iinfo )
371 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
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
subroutine cunmqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
CUNMQR