171 SUBROUTINE dormtr( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
172 $ work, lwork, info )
180 CHARACTER SIDE, TRANS, UPLO
181 INTEGER INFO, LDA, LDC, LWORK, M, N
184 DOUBLE PRECISION A( lda, * ), C( ldc, * ), TAU( * ), WORK( * )
190 LOGICAL LEFT, LQUERY, UPPER
191 INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
196 EXTERNAL lsame, ilaenv
209 left = lsame( side,
'L' )
210 upper = lsame( uplo,
'U' )
211 lquery = ( lwork.EQ.-1 )
222 IF( .NOT.left .AND. .NOT.lsame( side,
'R' ) )
THEN
224 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
226 ELSE IF( .NOT.lsame( trans,
'N' ) .AND. .NOT.lsame( trans,
'T' ) )
229 ELSE IF( m.LT.0 )
THEN
231 ELSE IF( n.LT.0 )
THEN
233 ELSE IF( lda.LT.max( 1, nq ) )
THEN
235 ELSE IF( ldc.LT.max( 1, m ) )
THEN
237 ELSE IF( lwork.LT.max( 1, nw ) .AND. .NOT.lquery )
THEN
244 nb = ilaenv( 1,
'DORMQL', side // trans, m-1, n, m-1,
247 nb = ilaenv( 1,
'DORMQL', side // trans, m, n-1, n-1,
252 nb = ilaenv( 1,
'DORMQR', side // trans, m-1, n, m-1,
255 nb = ilaenv( 1,
'DORMQR', side // trans, m, n-1, n-1,
259 lwkopt = max( 1, nw )*nb
264 CALL xerbla(
'DORMTR', -info )
266 ELSE IF( lquery )
THEN
272 IF( m.EQ.0 .OR. n.EQ.0 .OR. nq.EQ.1 )
THEN
289 CALL dormql( side, trans, mi, ni, nq-1, a( 1, 2 ), lda, tau, c,
290 $ ldc, work, lwork, iinfo )
302 CALL dormqr( side, trans, mi, ni, nq-1, a( 2, 1 ), lda, tau,
303 $ c( i1, i2 ), ldc, work, lwork, iinfo )
subroutine dormql(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
DORMQL
subroutine dormqr(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
DORMQR
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dormtr(SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
DORMTR