193 SUBROUTINE cunmbr( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
194 $ LDC, WORK, LWORK, INFO )
201 CHARACTER SIDE, TRANS, VECT
202 INTEGER INFO, K, LDA, LDC, LWORK, M, N
205 COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
212 LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN
214 INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
220 EXTERNAL ilaenv, lsame, sroundup_lwork
233 applyq = lsame( vect,
'Q' )
234 left = lsame( side,
'L' )
235 notran = lsame( trans,
'N' )
236 lquery = ( lwork.EQ.-1 )
247 IF( .NOT.applyq .AND. .NOT.lsame( vect,
'P' ) )
THEN
249 ELSE IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
251 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'C' ) )
THEN
253 ELSE IF( m.LT.0 )
THEN
255 ELSE IF( n.LT.0 )
THEN
257 ELSE IF( k.LT.0 )
THEN
259 ELSE IF( ( applyq .AND. lda.LT.max( 1, nq ) ) .OR.
260 $ ( .NOT.applyq .AND. lda.LT.max( 1, min( nq, k ) ) ) )
263 ELSE IF( ldc.LT.max( 1, m ) )
THEN
265 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
270 IF( m.GT.0 .AND. n.GT.0 )
THEN
273 nb = ilaenv( 1,
'CUNMQR', side // trans, m-1, n,
277 nb = ilaenv( 1,
'CUNMQR', side // trans, m, n-1,
283 nb = ilaenv( 1,
'CUNMLQ', side // trans, m-1, n,
287 nb = ilaenv( 1,
'CUNMLQ', side // trans, m, n-1,
296 work( 1 ) = sroundup_lwork(lwkopt)
300 CALL xerbla(
'CUNMBR', -info )
302 ELSE IF( lquery )
THEN
308 IF( m.EQ.0 .OR. n.EQ.0 )
319 CALL cunmqr( side, trans, m, n, k, a, lda, tau, c, ldc,
320 $ work, lwork, iinfo )
321 ELSE IF( nq.GT.1 )
THEN
336 CALL cunmqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda,
338 $ c( i1, i2 ), ldc, work, lwork, iinfo )
353 CALL cunmlq( side, transt, m, n, k, a, lda, tau, c, ldc,
354 $ work, lwork, iinfo )
355 ELSE IF( nq.GT.1 )
THEN
370 CALL cunmlq( side, transt, mi, ni, nq-1, a( 1, 2 ), lda,
371 $ tau, c( i1, i2 ), ldc, work, lwork, iinfo )
374 work( 1 ) = sroundup_lwork(lwkopt)
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