170 SUBROUTINE zlatsqr( M, N, MB, NB, A, LDA, T, LDT, WORK,
178 INTEGER INFO, LDA, M, N, MB, NB, LDT, LWORK
181 COMPLEX*16 A( LDA, * ), WORK( * ), T( LDT, * )
189 INTEGER I, II, KK, CTR, LWMIN, MINMN
199 INTRINSIC max, min, mod
207 lquery = ( lwork.EQ.-1 )
210 IF( minmn.EQ.0 )
THEN
218 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
220 ELSE IF( mb.LT.1 )
THEN
222 ELSE IF( nb.LT.1 .OR. ( nb.GT.n .AND. n.GT.0 ) )
THEN
224 ELSE IF( lda.LT.max( 1, m ) )
THEN
226 ELSE IF( ldt.LT.nb )
THEN
228 ELSE IF( lwork.LT.lwmin .AND. (.NOT.lquery) )
THEN
236 CALL xerbla(
'ZLATSQR', -info )
238 ELSE IF( lquery )
THEN
244 IF( minmn.EQ.0 )
THEN
250 IF( (mb.LE.n) .OR. (mb.GE.m) )
THEN
251 CALL zgeqrt( m, n, nb, a, lda, t, ldt, work, info )
254 kk = mod((m-n),(mb-n))
259 CALL zgeqrt( mb, n, nb, a(1,1), lda, t, ldt, work, info )
262 DO i = mb+1, ii-mb+n, (mb-n)
266 CALL ztpqrt( mb-n, n, 0, nb, a(1,1), lda, a( i, 1 ), lda,
275 CALL ztpqrt( kk, n, 0, nb, a(1,1), lda, a( ii, 1 ), lda,
276 $ t(1,ctr * n + 1), ldt,
subroutine zgeqrt(m, n, nb, a, lda, t, ldt, work, info)
ZGEQRT
subroutine zlatsqr(m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
ZLATSQR
subroutine ztpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info)
ZTPQRT