149 SUBROUTINE zlatsqr( M, N, MB, NB, A, LDA, T, LDT, WORK,
158 INTEGER INFO, LDA, M, N, MB, NB, LDT, LWORK
161 COMPLEX*16 A( lda, * ), WORK( * ), T(ldt, *)
169 INTEGER I, II, KK, CTR
177 INTRINSIC max, min, mod
185 lquery = ( lwork.EQ.-1 )
189 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
191 ELSE IF( mb.LE.n )
THEN
193 ELSE IF( nb.LT.1 .OR. ( nb.GT.n .AND. n.GT.0 ))
THEN
195 ELSE IF( lda.LT.max( 1, m ) )
THEN
197 ELSE IF( ldt.LT.nb )
THEN
199 ELSE IF( lwork.LT.(n*nb) .AND. (.NOT.lquery) )
THEN
206 CALL xerbla(
'ZLATSQR', -info )
208 ELSE IF (lquery)
THEN
214 IF( min(m,n).EQ.0 )
THEN
220 IF ((mb.LE.n).OR.(mb.GE.m))
THEN
221 CALL zgeqrt( m, n, nb, a, lda, t, ldt, work, info)
224 kk = mod((m-n),(mb-n))
229 CALL zgeqrt( mb, n, nb, a(1,1), lda, t, ldt, work, info )
232 DO i = mb+1, ii-mb+n , (mb-n)
236 CALL ztpqrt( mb-n, n, 0, nb, a(1,1), lda, a( i, 1 ), lda,
245 CALL ztpqrt( kk, n, 0, nb, a(1,1), lda, a( ii, 1 ), lda,
246 $ t(1,ctr * n + 1), ldt,
subroutine zlatsqr(M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK, INFO)
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine zgeqrt(M, N, NB, A, LDA, T, LDT, WORK, INFO)
ZGEQRT
subroutine ztpqrt(M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK, INFO)
ZTPQRT