210 SUBROUTINE dggrqf( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
218 INTEGER INFO, LDA, LDB, LWORK, M, N, P
221 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
229 INTEGER LOPT, LWKOPT, NB, NB1, NB2, NB3
239 INTRINSIC int, max, min
246 nb1 = ilaenv( 1,
'DGERQF',
' ', m, n, -1, -1 )
247 nb2 = ilaenv( 1,
'DGEQRF',
' ', p, n, -1, -1 )
248 nb3 = ilaenv( 1,
'DORMRQ',
' ', m, n, p, -1 )
249 nb = max( nb1, nb2, nb3 )
250 lwkopt = max( 1, max( n, m, p )*nb )
252 lquery = ( lwork.EQ.-1 )
255 ELSE IF( p.LT.0 )
THEN
257 ELSE IF( n.LT.0 )
THEN
259 ELSE IF( lda.LT.max( 1, m ) )
THEN
261 ELSE IF( ldb.LT.max( 1, p ) )
THEN
263 ELSE IF( lwork.LT.max( 1, m, p, n ) .AND. .NOT.lquery )
THEN
267 CALL xerbla(
'DGGRQF', -info )
269 ELSE IF( lquery )
THEN
275 CALL dgerqf( m, n, a, lda, taua, work, lwork, info )
276 lopt = int( work( 1 ) )
280 CALL dormrq(
'Right',
'Transpose', p, n, min( m, n ),
281 $ a( max( 1, m-n+1 ), 1 ), lda, taua, b, ldb, work,
283 lopt = max( lopt, int( work( 1 ) ) )
287 CALL dgeqrf( p, n, b, ldb, taub, work, lwork, info )
288 work( 1 ) = max( lopt, int( work( 1 ) ) )
subroutine dgeqrf(m, n, a, lda, tau, work, lwork, info)
DGEQRF
subroutine dgerqf(m, n, a, lda, tau, work, lwork, info)
DGERQF
subroutine dggrqf(m, p, n, a, lda, taua, b, ldb, taub, work, lwork, info)
DGGRQF
subroutine dormrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
DORMRQ