195 SUBROUTINE dormbr( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
196 $ ldc, work, lwork, info )
204 CHARACTER side, trans, vect
205 INTEGER info, k, lda, ldc, lwork, m, n
208 DOUBLE PRECISION a( lda, * ), c( ldc, * ), tau( * ), work( * )
214 LOGICAL applyq, left, lquery, notran
216 INTEGER i1, i2, iinfo, lwkopt, mi, nb, ni, nq, nw
234 applyq =
lsame( vect,
'Q' )
235 left =
lsame( side,
'L' )
236 notran =
lsame( trans,
'N' )
237 lquery = ( lwork.EQ.-1 )
248 IF( .NOT.applyq .AND. .NOT.
lsame( vect,
'P' ) )
THEN
250 ELSE IF( .NOT.left .AND. .NOT.
lsame( side,
'R' ) )
THEN
252 ELSE IF( .NOT.notran .AND. .NOT.
lsame( trans,
'T' ) )
THEN
254 ELSE IF( m.LT.0 )
THEN
256 ELSE IF( n.LT.0 )
THEN
258 ELSE IF( k.LT.0 )
THEN
260 ELSE IF( ( applyq .AND. lda.LT.max( 1, nq ) ) .OR.
261 $ ( .NOT.applyq .AND. lda.LT.max( 1, min( nq, k ) ) ) )
264 ELSE IF( ldc.LT.max( 1, m ) )
THEN
266 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
273 nb =
ilaenv( 1,
'DORMQR', side // trans, m-1, n, m-1,
276 nb =
ilaenv( 1,
'DORMQR', side // trans, m, n-1, n-1,
281 nb =
ilaenv( 1,
'DORMLQ', side // trans, m-1, n, m-1,
284 nb =
ilaenv( 1,
'DORMLQ', side // trans, m, n-1, n-1,
288 lwkopt = max( 1, nw )*nb
293 CALL
xerbla(
'DORMBR', -info )
295 ELSE IF( lquery )
THEN
302 IF( m.EQ.0 .OR. n.EQ.0 )
313 CALL
dormqr( side, trans, m, n, k, a, lda, tau, c, ldc,
314 $ work, lwork, iinfo )
315 ELSE IF( nq.GT.1 )
THEN
330 CALL
dormqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda, tau,
331 $ c( i1, i2 ), ldc, work, lwork, iinfo )
346 CALL
dormlq( side, transt, m, n, k, a, lda, tau, c, ldc,
347 $ work, lwork, iinfo )
348 ELSE IF( nq.GT.1 )
THEN
363 CALL
dormlq( side, transt, mi, ni, nq-1, a( 1, 2 ), lda,
364 $ tau, c( i1, i2 ), ldc, work, lwork, iinfo )