149 SUBROUTINE dlatsqr( M, N, MB, NB, A, LDA, T, LDT, WORK,
158 INTEGER INFO, LDA, M, N, MB, NB, LDT, LWORK
161 DOUBLE PRECISION 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(
'DLATSQR', -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 dgeqrt( m, n, nb, a, lda, t, ldt, work, info)
225 kk = mod((m-n),(mb-n))
230 CALL dgeqrt( mb, n, nb, a(1,1), lda, t, ldt, work, info )
233 DO i = mb+1, ii-mb+n , (mb-n)
237 CALL dtpqrt( mb-n, n, 0, nb, a(1,1), lda, a( i, 1 ), lda,
246 CALL dtpqrt( kk, n, 0, nb, a(1,1), lda, a( ii, 1 ), lda,
247 $ t(1, ctr * n + 1), ldt,
subroutine dlatsqr(M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK, INFO)
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dgeqrt(M, N, NB, A, LDA, T, LDT, WORK, INFO)
DGEQRT
subroutine dtpqrt(M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK, INFO)
DTPQRT