170 SUBROUTINE slatsqr( M, N, MB, NB, A, LDA, T, LDT, WORK,
178 INTEGER INFO, LDA, M, N, MB, NB, LDT, LWORK
181 REAL A( LDA, * ), WORK( * ), T( LDT, * )
189 INTEGER I, II, KK, CTR, MINMN, LWMIN
195 EXTERNAL sroundup_lwork
201 INTRINSIC max, min, mod
209 lquery = ( lwork.EQ.-1 )
212 IF( minmn.EQ.0 )
THEN
220 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
222 ELSE IF( mb.LT.1 )
THEN
224 ELSE IF( nb.LT.1 .OR. ( nb.GT.n .AND. n.GT.0 ) )
THEN
226 ELSE IF( lda.LT.max( 1, m ) )
THEN
228 ELSE IF( ldt.LT.nb )
THEN
230 ELSE IF( lwork.LT.lwmin .AND. (.NOT.lquery) )
THEN
235 work( 1 ) = sroundup_lwork( lwmin )
238 CALL xerbla(
'SLATSQR', -info )
240 ELSE IF( lquery )
THEN
246 IF( minmn.EQ.0 )
THEN
252 IF( (mb.LE.n) .OR. (mb.GE.m) )
THEN
253 CALL sgeqrt( m, n, nb, a, lda, t, ldt, work, info )
256 kk = mod((m-n),(mb-n))
261 CALL sgeqrt( mb, n, nb, a(1,1), lda, t, ldt, work, info )
264 DO i = mb+1, ii-mb+n, (mb-n)
268 CALL stpqrt( mb-n, n, 0, nb, a(1,1), lda, a( i, 1 ), lda,
277 CALL stpqrt( kk, n, 0, nb, a(1,1), lda, a( ii, 1 ), lda,
278 $ t(1, ctr * n + 1), ldt,
282 work( 1 ) = sroundup_lwork( lwmin )
subroutine sgeqrt(m, n, nb, a, lda, t, ldt, work, info)
SGEQRT
subroutine slatsqr(m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
SLATSQR
subroutine stpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info)
STPQRT