167 SUBROUTINE clatsqr( M, N, MB, NB, A, LDA, T, LDT, WORK,
175 INTEGER INFO, LDA, M, N, MB, NB, LDT, LWORK
178 COMPLEX A( LDA, * ), WORK( * ), T(LDT, *)
186 INTEGER I, II, KK, CTR
191 EXTERNAL lsame, sroundup_lwork
195 INTRINSIC max, min, mod
203 lquery = ( lwork.EQ.-1 )
207 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
209 ELSE IF( mb.LT.1 )
THEN
211 ELSE IF( nb.LT.1 .OR. ( nb.GT.n .AND. n.GT.0 ))
THEN
213 ELSE IF( lda.LT.max( 1, m ) )
THEN
215 ELSE IF( ldt.LT.nb )
THEN
217 ELSE IF( lwork.LT.(n*nb) .AND. (.NOT.lquery) )
THEN
221 work(1) = sroundup_lwork(nb*n)
224 CALL xerbla(
'CLATSQR', -info )
226 ELSE IF (lquery)
THEN
232 IF( min(m,n).EQ.0 )
THEN
238 IF ((mb.LE.n).OR.(mb.GE.m))
THEN
239 CALL cgeqrt( m, n, nb, a, lda, t, ldt, work, info)
242 kk = mod((m-n),(mb-n))
247 CALL cgeqrt( mb, n, nb, a(1,1), lda, t, ldt, work, info )
250 DO i = mb+1, ii-mb+n , (mb-n)
254 CALL ctpqrt( mb-n, n, 0, nb, a(1,1), lda, a( i, 1 ), lda,
263 CALL ctpqrt( kk, n, 0, nb, a(1,1), lda, a( ii, 1 ), lda,
264 $ t(1, ctr * n + 1), ldt,
268 work( 1 ) = sroundup_lwork(n*nb)
subroutine xerbla(srname, info)
subroutine cgeqrt(m, n, nb, a, lda, t, ldt, work, info)
CGEQRT
subroutine clatsqr(m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
CLATSQR
subroutine ctpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info)
CTPQRT