173 SUBROUTINE dgemqr( SIDE, TRANS, M, N, K, A, LDA, T, TSIZE,
174 $ C, LDC, WORK, LWORK, INFO )
181 CHARACTER SIDE, TRANS
182 INTEGER INFO, LDA, M, N, K, TSIZE, LWORK, LDC
185 DOUBLE PRECISION A( LDA, * ), T( * ), C( LDC, * ), WORK( * )
192 LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY
193 INTEGER MB, NB, LW, NBLCKS, MN, MINMNK, LWMIN
203 INTRINSIC int, max, min, mod
209 lquery = ( lwork.EQ.-1 )
210 notran = lsame( trans,
'N' )
211 tran = lsame( trans,
'T' )
212 left = lsame( side,
'L' )
213 right = lsame( side,
'R' )
225 minmnk = min( m, n, k )
226 IF( minmnk.EQ.0 )
THEN
232 IF( ( mb.GT.k ) .AND. ( mn.GT.k ) )
THEN
233 IF( mod( mn - k, mb - k ).EQ.0 )
THEN
234 nblcks = ( mn - k ) / ( mb - k )
236 nblcks = ( mn - k ) / ( mb - k ) + 1
243 IF( .NOT.left .AND. .NOT.right )
THEN
245 ELSE IF( .NOT.tran .AND. .NOT.notran )
THEN
247 ELSE IF( m.LT.0 )
THEN
249 ELSE IF( n.LT.0 )
THEN
251 ELSE IF( k.LT.0 .OR. k.GT.mn )
THEN
253 ELSE IF( lda.LT.max( 1, mn ) )
THEN
255 ELSE IF( tsize.LT.5 )
THEN
257 ELSE IF( ldc.LT.max( 1, m ) )
THEN
259 ELSE IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
268 CALL xerbla(
'DGEMQR', -info )
270 ELSE IF( lquery )
THEN
276 IF( minmnk.EQ.0 )
THEN
280 IF( ( left .AND. m.LE.k ) .OR. ( right .AND. n.LE.k )
281 $ .OR. ( mb.LE.k ) .OR. ( mb.GE.max( m, n, k ) ) )
THEN
282 CALL dgemqrt( side, trans, m, n, k, nb, a, lda, t( 6 ),
283 $ nb, c, ldc, work, info )
285 CALL dlamtsqr( side, trans, m, n, k, mb, nb, a, lda, t( 6 ),
286 $ nb, c, ldc, work, lwork, info )
subroutine dgemqr(side, trans, m, n, k, a, lda, t, tsize, c, ldc, work, lwork, info)
DGEMQR
subroutine dgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info)
DGEMQRT
subroutine dlamtsqr(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
DLAMTSQR