195 INTEGER INFO, LDA, LDT, LWORK, M, N, MB, NB
198 REAL A( LDA, * ), T( LDT, * ), WORK( * )
205 parameter( one = 1.0e+0, zero = 0.0e+0 )
209 INTEGER NBLOCAL, MB2, M_PLUS_ONE, ITMP, IB_BOTTOM,
210 $ lworkopt, num_all_row_blocks, jb_t, ib, imb,
211 $ kb, kb_last, knb, mb1
218 EXTERNAL sroundup_lwork
234 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
236 ELSE IF( mb.LE.n )
THEN
238 ELSE IF( nb.LT.1 )
THEN
240 ELSE IF( lda.LT.max( 1, m ) )
THEN
242 ELSE IF( ldt.LT.max( 1, min( nb, n ) ) )
THEN
244 ELSE IF( lwork.LT.1 .AND. .NOT.lquery )
THEN
248 nblocal = min( nb, n )
253 lworkopt = nblocal * max( nblocal, ( n - nblocal ) )
259 CALL xerbla(
'SORGTSQR_ROW', -info )
261 ELSE IF ( lquery )
THEN
262 work( 1 ) = sroundup_lwork( lworkopt )
268 IF( min( m, n ).EQ.0 )
THEN
269 work( 1 ) = sroundup_lwork( lworkopt )
276 CALL slaset(
'U', m, n, zero, one, a, lda )
281 kb_last = ( ( n-1 ) / nblocal ) * nblocal + 1
303 itmp = ( m - mb - 1 ) / mb2
304 ib_bottom = itmp * mb2 + mb + 1
305 num_all_row_blocks = itmp + 2
306 jb_t = num_all_row_blocks * n + 1
308 DO ib = ib_bottom, mb+1, -mb2
313 imb = min( m_plus_one - ib, mb2 )
325 DO kb = kb_last, 1, -nblocal
330 knb = min( nblocal, n - kb + 1 )
333 $ t( 1, jb_t+kb-1 ), ldt, a( kb, kb ), lda,
334 $ a( ib, kb ), lda, work, knb )
353 DO kb = kb_last, 1, -nblocal
358 knb = min( nblocal, n - kb + 1 )
360 IF( mb1-kb-knb+1.EQ.0 )
THEN
367 $ t( 1, kb ), ldt, a( kb, kb ), lda,
368 $ dummy( 1, 1 ), 1, work, knb )
371 $ t( 1, kb ), ldt, a( kb, kb ), lda,
372 $ a( kb+knb, kb), lda, work, knb )
378 work( 1 ) = sroundup_lwork( lworkopt )
subroutine xerbla(srname, info)
subroutine slarfb_gett(ident, m, n, k, t, ldt, a, lda, b, ldb, work, ldwork)
SLARFB_GETT
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine sorgtsqr_row(m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
SORGTSQR_ROW