170 SUBROUTINE clatsqr( M, N, MB, NB, A, LDA, T, LDT, WORK,
178 INTEGER INFO, LDA, M, N, MB, NB, LDT, LWORK
181 COMPLEX A( LDA, * ), WORK( * ), T( LDT, * )
189 INTEGER I, II, KK, CTR, LWMIN, MINMN
194 EXTERNAL lsame, sroundup_lwork
200 INTRINSIC max, min, mod
208 lquery = ( lwork.EQ.-1 )
211 IF( minmn.EQ.0 )
THEN
219 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
221 ELSE IF( mb.LT.1 )
THEN
223 ELSE IF( nb.LT.1 .OR. ( nb.GT.n .AND. n.GT.0 ) )
THEN
225 ELSE IF( lda.LT.max( 1, m ) )
THEN
227 ELSE IF( ldt.LT.nb )
THEN
229 ELSE IF( lwork.LT.lwmin .AND. (.NOT.lquery) )
THEN
234 work( 1 ) = sroundup_lwork( lwmin )
237 CALL xerbla(
'CLATSQR', -info )
239 ELSE IF( lquery )
THEN
245 IF( minmn.EQ.0 )
THEN
251 IF ( (mb.LE.n) .OR. (mb.GE.m) )
THEN
252 CALL cgeqrt( m, n, nb, a, lda, t, ldt, work, info )
255 kk = mod((m-n),(mb-n))
260 CALL cgeqrt( mb, n, nb, a(1,1), lda, t, ldt, work, info )
263 DO i = mb+1, ii-mb+n, (mb-n)
267 CALL ctpqrt( mb-n, n, 0, nb, a(1,1), lda, a( i, 1 ), lda,
276 CALL ctpqrt( kk, n, 0, nb, a(1,1), lda, a( ii, 1 ), lda,
277 $ t(1, ctr * n + 1), ldt,
281 work( 1 ) = sroundup_lwork( lwmin )
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