191 SUBROUTINE dormbr( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
192 $ LDC, WORK, LWORK, INFO )
199 CHARACTER SIDE, TRANS, VECT
200 INTEGER INFO, K, LDA, LDC, LWORK, M, N
203 DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
209 LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN
211 INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
216 EXTERNAL lsame, ilaenv
229 applyq = lsame( vect,
'Q' )
230 left = lsame( side,
'L' )
231 notran = lsame( trans,
'N' )
232 lquery = ( lwork.EQ.-1 )
243 IF( .NOT.applyq .AND. .NOT.lsame( vect,
'P' ) )
THEN
245 ELSE IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
247 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) )
THEN
249 ELSE IF( m.LT.0 )
THEN
251 ELSE IF( n.LT.0 )
THEN
253 ELSE IF( k.LT.0 )
THEN
255 ELSE IF( ( applyq .AND. lda.LT.max( 1, nq ) ) .OR.
256 $ ( .NOT.applyq .AND. lda.LT.max( 1, min( nq, k ) ) ) )
259 ELSE IF( ldc.LT.max( 1, m ) )
THEN
261 ELSE IF( lwork.LT.nw .AND. .NOT.lquery )
THEN
268 nb = ilaenv( 1,
'DORMQR', side // trans, m-1, n, m-1,
271 nb = ilaenv( 1,
'DORMQR', side // trans, m, n-1, n-1,
276 nb = ilaenv( 1,
'DORMLQ', side // trans, m-1, n, m-1,
279 nb = ilaenv( 1,
'DORMLQ', side // trans, m, n-1, n-1,
288 CALL xerbla(
'DORMBR', -info )
290 ELSE IF( lquery )
THEN
297 IF( m.EQ.0 .OR. n.EQ.0 )
308 CALL dormqr( side, trans, m, n, k, a, lda, tau, c, ldc,
309 $ work, lwork, iinfo )
310 ELSE IF( nq.GT.1 )
THEN
325 CALL dormqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda,
327 $ c( i1, i2 ), ldc, work, lwork, iinfo )
342 CALL dormlq( side, transt, m, n, k, a, lda, tau, c, ldc,
343 $ work, lwork, iinfo )
344 ELSE IF( nq.GT.1 )
THEN
359 CALL dormlq( side, transt, mi, ni, nq-1, a( 1, 2 ), lda,
360 $ tau, c( i1, i2 ), ldc, work, lwork, iinfo )
subroutine dormbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
DORMBR