1 SUBROUTINE dormbr( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
2 $ LDC, WORK, LWORK, INFO )
10 CHARACTER SIDE, TRANS, VECT
11 INTEGER INFO, K, LDA, LDC, LWORK, M, N
14 DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
124 LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN
126 INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
131 EXTERNAL lsame, ilaenv
144 applyq = lsame( vect,
'Q' )
145 left = lsame( side,
'L' )
146 notran = lsame( trans,
'N' )
147 lquery = ( lwork.EQ.-1 )
158 IF( .NOT.applyq .AND. .NOT.lsame( vect,
'P' ) )
THEN
160 ELSE IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
162 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) )
THEN
164 ELSE IF( m.LT.0 )
THEN
166 ELSE IF( n.LT.0 )
THEN
168 ELSE IF( k.LT.0 )
THEN
170 ELSE IF( ( applyq .AND. lda.LT.max( 1, nq ) ) .OR.
171 $ ( .NOT.applyq .AND. lda.LT.max( 1, min( nq, k ) ) ) )
174 ELSE IF( ldc.LT.max( 1, m ) )
THEN
176 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
183 nb = ilaenv( 1,
'DORMQR', side // trans, m-1, n, m-1,
186 nb = ilaenv( 1,
'DORMQR', side // trans, m, n-1, n-1,
191 nb = ilaenv( 1,
'DORMLQ', side // trans, m-1, n, m-1,
194 nb = ilaenv( 1,
'DORMLQ', side // trans, m, n-1, n-1,
198 lwkopt = max( 1, nw )*nb
203 CALL xerbla(
'DORMBR', -info )
205 ELSE IF( lquery )
THEN
212 IF( m.EQ.0 .OR. n.EQ.0 )
223 CALL dormqr( side, trans, m, n, k, a, lda, tau, c, ldc,
224 $ work, lwork, iinfo )
225 ELSE IF( nq.GT.1 )
THEN
240 CALL dormqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda, tau,
241 $ c( i1, i2 ), ldc, work, lwork, iinfo )
256 CALL dormlq( side, transt, m, n, k, a, lda, tau, c, ldc,
257 $ work, lwork, iinfo )
258 ELSE IF( nq.GT.1 )
THEN
273 CALL dormlq( side, transt, mi, ni, nq-1, a( 1, 2 ), lda,
274 $ tau, c( i1, i2 ), ldc, work, lwork, iinfo )
subroutine dormbr(VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
subroutine dormlq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
subroutine dormqr(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
subroutine xerbla(SRNAME, INFO)