212 SUBROUTINE sggrqf( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
220 INTEGER INFO, LDA, LDB, LWORK, M, N, P
223 REAL A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
231 INTEGER LOPT, LWKOPT, NB, NB1, NB2, NB3
239 EXTERNAL ilaenv, sroundup_lwork
242 INTRINSIC int, max, min
249 nb1 = ilaenv( 1,
'SGERQF',
' ', m, n, -1, -1 )
250 nb2 = ilaenv( 1,
'SGEQRF',
' ', p, n, -1, -1 )
251 nb3 = ilaenv( 1,
'SORMRQ',
' ', m, n, p, -1 )
252 nb = max( nb1, nb2, nb3 )
253 lwkopt = max( n, m, p)*nb
254 work( 1 ) = sroundup_lwork(lwkopt)
255 lquery = ( lwork.EQ.-1 )
258 ELSE IF( p.LT.0 )
THEN
260 ELSE IF( n.LT.0 )
THEN
262 ELSE IF( lda.LT.max( 1, m ) )
THEN
264 ELSE IF( ldb.LT.max( 1, p ) )
THEN
266 ELSE IF( lwork.LT.max( 1, m, p, n ) .AND. .NOT.lquery )
THEN
270 CALL xerbla(
'SGGRQF', -info )
272 ELSE IF( lquery )
THEN
278 CALL sgerqf( m, n, a, lda, taua, work, lwork, info )
279 lopt = int( work( 1 ) )
283 CALL sormrq(
'Right',
'Transpose', p, n, min( m, n ),
284 $ a( max( 1, m-n+1 ), 1 ), lda, taua, b, ldb, work,
286 lopt = max( lopt, int( work( 1 ) ) )
290 CALL sgeqrf( p, n, b, ldb, taub, work, lwork, info )
291 lwkopt = max( lopt, int( work( 1 ) ) )
292 work( 1 ) = sroundup_lwork( lwkopt )
subroutine xerbla(srname, info)
subroutine sgeqrf(m, n, a, lda, tau, work, lwork, info)
SGEQRF
subroutine sgerqf(m, n, a, lda, tau, work, lwork, info)
SGERQF
subroutine sggrqf(m, p, n, a, lda, taua, b, ldb, taub, work, lwork, info)
SGGRQF
subroutine sormrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
SORMRQ