215 SUBROUTINE sggqrf( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
224 INTEGER INFO, LDA, LDB, LWORK, M, N, P
227 REAL A( lda, * ), B( ldb, * ), TAUA( * ), TAUB( * ),
235 INTEGER LOPT, LWKOPT, NB, NB1, NB2, NB3
245 INTRINSIC int, max, min
252 nb1 = ilaenv( 1,
'SGEQRF',
' ', n, m, -1, -1 )
253 nb2 = ilaenv( 1,
'SGERQF',
' ', n, p, -1, -1 )
254 nb3 = ilaenv( 1,
'SORMQR',
' ', n, m, p, -1 )
255 nb = max( nb1, nb2, nb3 )
256 lwkopt = max( n, m, p )*nb
258 lquery = ( lwork.EQ.-1 )
261 ELSE IF( m.LT.0 )
THEN
263 ELSE IF( p.LT.0 )
THEN
265 ELSE IF( lda.LT.max( 1, n ) )
THEN
267 ELSE IF( ldb.LT.max( 1, n ) )
THEN
269 ELSE IF( lwork.LT.max( 1, n, m, p ) .AND. .NOT.lquery )
THEN
273 CALL xerbla(
'SGGQRF', -info )
275 ELSE IF( lquery )
THEN
281 CALL sgeqrf( n, m, a, lda, taua, work, lwork, info )
286 CALL sormqr(
'Left',
'Transpose', n, p, min( n, m ), a, lda, taua,
287 $ b, ldb, work, lwork, info )
288 lopt = max( lopt, int( work( 1 ) ) )
292 CALL sgerqf( n, p, b, ldb, taub, work, lwork, info )
293 work( 1 ) = max( lopt, int( work( 1 ) ) )
subroutine sggqrf(N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK, LWORK, INFO)
SGGQRF
subroutine sgeqrf(M, N, A, LDA, TAU, WORK, LWORK, INFO)
SGEQRF
subroutine sormqr(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
SORMQR
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine sgerqf(M, N, A, LDA, TAU, WORK, LWORK, INFO)
SGERQF