172 SUBROUTINE sorgtsqr( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
181 INTEGER INFO, LDA, LDT, LWORK, M, N, MB, NB
184 REAL A( LDA, * ), T( LDT, * ), WORK( * )
191 parameter( one = 1.0e+0, zero = 0.0e+0 )
195 INTEGER IINFO, LDC, LWORKOPT, LC, LW, NBLOCAL, J
199 EXTERNAL sroundup_lwork
215 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
217 ELSE IF( mb.LE.n )
THEN
219 ELSE IF( nb.LT.1 )
THEN
221 ELSE IF( lda.LT.max( 1, m ) )
THEN
223 ELSE IF( ldt.LT.max( 1, min( nb, n ) ) )
THEN
231 IF( lwork.LT.2 .AND. (.NOT.lquery) )
THEN
237 nblocal = min( nb, n )
249 IF( ( lwork.LT.max( 1, lworkopt ) ).AND.(.NOT.lquery) )
THEN
259 CALL xerbla(
'SORGTSQR', -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 )
284 CALL slaset(
'F', m, n, zero, one, work, ldc )
291 CALL slamtsqr(
'L',
'N', m, n, n, mb, nblocal, a, lda, t, ldt,
292 $ work, ldc, work( lc+1 ), lw, iinfo )
299 CALL scopy( m, work( (j-1)*ldc + 1 ), 1, a( 1, j ), 1 )
302 work( 1 ) = sroundup_lwork( lworkopt )
subroutine slamtsqr(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
SLAMTSQR
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(m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
SORGTSQR