215 SUBROUTINE zggqrf( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
224 INTEGER INFO, LDA, LDB, LWORK, M, N, P
227 COMPLEX*16 A( lda, * ), B( ldb, * ), TAUA( * ), TAUB( * ),
235 INTEGER LOPT, LWKOPT, NB, NB1, NB2, NB3
245 INTRINSIC int, max, min
252 nb1 = ilaenv( 1,
'ZGEQRF',
' ', n, m, -1, -1 )
253 nb2 = ilaenv( 1,
'ZGERQF',
' ', n, p, -1, -1 )
254 nb3 = ilaenv( 1,
'ZUNMQR',
' ', 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(
'ZGGQRF', -info )
275 ELSE IF( lquery )
THEN
281 CALL zgeqrf( n, m, a, lda, taua, work, lwork, info )
286 CALL zunmqr(
'Left',
'Conjugate Transpose', n, p, min( n, m ), a,
287 $ lda, taua, b, ldb, work, lwork, info )
288 lopt = max( lopt, int( work( 1 ) ) )
292 CALL zgerqf( n, p, b, ldb, taub, work, lwork, info )
293 work( 1 ) = max( lopt, int( work( 1 ) ) )
subroutine zgeqrf(M, N, A, LDA, TAU, WORK, LWORK, INFO)
ZGEQRF VARIANT: left-looking Level 3 BLAS of the algorithm.
subroutine zgerqf(M, N, A, LDA, TAU, WORK, LWORK, INFO)
ZGERQF
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine zunmqr(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
ZUNMQR
subroutine zggqrf(N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK, LWORK, INFO)
ZGGQRF