177 SUBROUTINE dgetsqrhrt( M, N, MB1, NB1, NB2, A, LDA, T, LDT, WORK,
186 INTEGER INFO, LDA, LDT, LWORK, M, N, NB1, NB2, MB1
189 DOUBLE PRECISION A( LDA, * ), T( LDT, * ), WORK( * )
196 parameter( one = 1.0d+0 )
200 INTEGER I, IINFO, J, LW1, LW2, LWT, LDWT, LWORKOPT,
201 $ nb1local, nb2local, num_all_row_blocks
208 INTRINSIC ceiling, dble, max, min
218 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
220 ELSE IF( mb1.LE.n )
THEN
222 ELSE IF( nb1.LT.1 )
THEN
224 ELSE IF( nb2.LT.1 )
THEN
226 ELSE IF( lda.LT.max( 1, m ) )
THEN
228 ELSE IF( ldt.LT.max( 1, min( nb2, n ) ) )
THEN
239 IF( lwork.LT.n*n+1 .AND. .NOT.lquery )
THEN
245 nb1local = min( nb1, n )
247 num_all_row_blocks = max( 1,
248 $ ceiling( dble( m - n ) / dble( mb1 - n ) ) )
253 lwt = num_all_row_blocks * n * nb1local
263 lw2 = nb1local * max( nb1local, ( n - nb1local ) )
265 lworkopt = max( lwt + lw1, max( lwt+n*n+lw2, lwt+n*n+n ) )
267 IF( ( lwork.LT.max( 1, lworkopt ) ).AND.(.NOT.lquery) )
THEN
277 CALL xerbla(
'DGETSQRHRT', -info )
279 ELSE IF ( lquery )
THEN
280 work( 1 ) = dble( lworkopt )
286 IF( min( m, n ).EQ.0 )
THEN
287 work( 1 ) = dble( lworkopt )
291 nb2local = min( nb2, n )
296 CALL dlatsqr( m, n, mb1, nb1local, a, lda, work, ldwt,
297 $ work(lwt+1), lw1, iinfo )
304 CALL dcopy( j, a( 1, j ), 1, work( lwt + n*(j-1)+1 ), 1 )
311 CALL dorgtsqr_row( m, n, mb1, nb1local, a, lda, work, ldwt,
312 $ work( lwt+n*n+1 ), lw2, iinfo )
317 CALL dorhr_col( m, n, nb2local, a, lda, t, ldt,
318 $ work( lwt+n*n+1 ), iinfo )
335 IF( work( lwt+n*n+i ).EQ.-one )
THEN
337 a( i, j ) = -one * work( lwt+n*(j-1)+i )
340 CALL dcopy( n-i+1, work(lwt+n*(i-1)+i), n, a( i, i ), lda )
344 work( 1 ) = dble( lworkopt )
subroutine dgetsqrhrt(m, n, mb1, nb1, nb2, a, lda, t, ldt, work, lwork, info)
DGETSQRHRT