212 SUBROUTINE dggrqf( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
220 INTEGER INFO, LDA, LDB, LWORK, M, N, P
223 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
231 INTEGER LOPT, LWKOPT, NB, NB1, NB2, NB3
241 INTRINSIC int, max, min
248 nb1 = ilaenv( 1,
'DGERQF',
' ', m, n, -1, -1 )
249 nb2 = ilaenv( 1,
'DGEQRF',
' ', p, n, -1, -1 )
250 nb3 = ilaenv( 1,
'DORMRQ',
' ', m, n, p, -1 )
251 nb = max( nb1, nb2, nb3 )
252 lwkopt = max( n, m, p )*nb
254 lquery = ( lwork.EQ.-1 )
257 ELSE IF( p.LT.0 )
THEN
259 ELSE IF( n.LT.0 )
THEN
261 ELSE IF( lda.LT.max( 1, m ) )
THEN
263 ELSE IF( ldb.LT.max( 1, p ) )
THEN
265 ELSE IF( lwork.LT.max( 1, m, p, n ) .AND. .NOT.lquery )
THEN
269 CALL xerbla(
'DGGRQF', -info )
271 ELSE IF( lquery )
THEN
277 CALL dgerqf( m, n, a, lda, taua, work, lwork, info )
278 lopt = int( work( 1 ) )
282 CALL dormrq(
'Right',
'Transpose', p, n, min( m, n ),
283 $ a( max( 1, m-n+1 ), 1 ), lda, taua, b, ldb, work,
285 lopt = max( lopt, int( work( 1 ) ) )
289 CALL dgeqrf( p, n, b, ldb, taub, work, lwork, info )
290 work( 1 ) = max( lopt, int( work( 1 ) ) )
subroutine xerbla(srname, info)
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