213 SUBROUTINE dggqrf( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
221 INTEGER INFO, LDA, LDB, LWORK, M, N, P
224 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
232 INTEGER LOPT, LWKOPT, NB, NB1, NB2, NB3
242 INTRINSIC int, max, min
249 nb1 = ilaenv( 1,
'DGEQRF',
' ', n, m, -1, -1 )
250 nb2 = ilaenv( 1,
'DGERQF',
' ', n, p, -1, -1 )
251 nb3 = ilaenv( 1,
'DORMQR',
' ', n, m, p, -1 )
252 nb = max( nb1, nb2, nb3 )
253 lwkopt = max( n, m, p )*nb
255 lquery = ( lwork.EQ.-1 )
258 ELSE IF( m.LT.0 )
THEN
260 ELSE IF( p.LT.0 )
THEN
262 ELSE IF( lda.LT.max( 1, n ) )
THEN
264 ELSE IF( ldb.LT.max( 1, n ) )
THEN
266 ELSE IF( lwork.LT.max( 1, n, m, p ) .AND. .NOT.lquery )
THEN
270 CALL xerbla(
'DGGQRF', -info )
272 ELSE IF( lquery )
THEN
278 CALL dgeqrf( n, m, a, lda, taua, work, lwork, info )
279 lopt = int( work( 1 ) )
283 CALL dormqr(
'Left',
'Transpose', n, p, min( n, m ), a, lda, taua,
284 $ b, ldb, work, lwork, info )
285 lopt = max( lopt, int( work( 1 ) ) )
289 CALL dgerqf( n, p, 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 dggqrf(n, m, p, a, lda, taua, b, ldb, taub, work, lwork, info)
DGGQRF
subroutine dormqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
DORMQR