211 SUBROUTINE cggqrf( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
219 INTEGER INFO, LDA, LDB, LWORK, M, N, P
222 COMPLEX A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
230 INTEGER LOPT, LWKOPT, NB, NB1, NB2, NB3
238 EXTERNAL ilaenv, sroundup_lwork
241 INTRINSIC int, max, min
248 nb1 = ilaenv( 1,
'CGEQRF',
' ', n, m, -1, -1 )
249 nb2 = ilaenv( 1,
'CGERQF',
' ', n, p, -1, -1 )
250 nb3 = ilaenv( 1,
'CUNMQR',
' ', n, m, p, -1 )
251 nb = max( nb1, nb2, nb3 )
252 lwkopt = max( 1, max( n, m, p )*nb )
253 work( 1 ) = sroundup_lwork( lwkopt )
254 lquery = ( lwork.EQ.-1 )
257 ELSE IF( m.LT.0 )
THEN
259 ELSE IF( p.LT.0 )
THEN
261 ELSE IF( lda.LT.max( 1, n ) )
THEN
263 ELSE IF( ldb.LT.max( 1, n ) )
THEN
265 ELSE IF( lwork.LT.max( 1, n, m, p ) .AND. .NOT.lquery )
THEN
269 CALL xerbla(
'CGGQRF', -info )
271 ELSE IF( lquery )
THEN
277 CALL cgeqrf( n, m, a, lda, taua, work, lwork, info )
278 lopt = int( work( 1 ) )
282 CALL cunmqr(
'Left',
'Conjugate Transpose', n, p, min( n, m ),
284 $ lda, taua, b, ldb, work, lwork, info )
285 lopt = max( lopt, int( work( 1 ) ) )
289 CALL cgerqf( n, p, b, ldb, taub, work, lwork, info )
290 work( 1 ) = sroundup_lwork( max( lopt, int( work( 1 ) ) ) )
subroutine cgeqrf(m, n, a, lda, tau, work, lwork, info)
CGEQRF
subroutine cgerqf(m, n, a, lda, tau, work, lwork, info)
CGERQF
subroutine cggqrf(n, m, p, a, lda, taua, b, ldb, taub, work, lwork, info)
CGGQRF
subroutine cunmqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
CUNMQR