195 INTEGER INFO, LDA, LDT, LWORK, M, N, MB, NB
198 COMPLEX A( LDA, * ), T( LDT, * ), WORK( * )
205 parameter( cone = ( 1.0e+0, 0.0e+0 ),
206 $ czero = ( 0.0e+0, 0.0e+0 ) )
210 INTEGER NBLOCAL, MB2, M_PLUS_ONE, ITMP, IB_BOTTOM,
211 $ lworkopt, num_all_row_blocks, jb_t, ib, imb,
212 $ kb, kb_last, knb, mb1
215 COMPLEX DUMMY( 1, 1 )
221 INTRINSIC cmplx, max, min
231 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
233 ELSE IF( mb.LE.n )
THEN
235 ELSE IF( nb.LT.1 )
THEN
237 ELSE IF( lda.LT.max( 1, m ) )
THEN
239 ELSE IF( ldt.LT.max( 1, min( nb, n ) ) )
THEN
241 ELSE IF( lwork.LT.1 .AND. .NOT.lquery )
THEN
245 nblocal = min( nb, n )
250 lworkopt = nblocal * max( nblocal, ( n - nblocal ) )
256 CALL xerbla(
'CUNGTSQR_ROW', -info )
258 ELSE IF ( lquery )
THEN
259 work( 1 ) = cmplx( lworkopt )
265 IF( min( m, n ).EQ.0 )
THEN
266 work( 1 ) = cmplx( lworkopt )
273 CALL claset(
'U', m, n, czero, cone, a, lda )
278 kb_last = ( ( n-1 ) / nblocal ) * nblocal + 1
300 itmp = ( m - mb - 1 ) / mb2
301 ib_bottom = itmp * mb2 + mb + 1
302 num_all_row_blocks = itmp + 2
303 jb_t = num_all_row_blocks * n + 1
305 DO ib = ib_bottom, mb+1, -mb2
310 imb = min( m_plus_one - ib, mb2 )
322 DO kb = kb_last, 1, -nblocal
327 knb = min( nblocal, n - kb + 1 )
330 $ t( 1, jb_t+kb-1 ), ldt, a( kb, kb ), lda,
331 $ a( ib, kb ), lda, work, knb )
350 DO kb = kb_last, 1, -nblocal
355 knb = min( nblocal, n - kb + 1 )
357 IF( mb1-kb-knb+1.EQ.0 )
THEN
364 $ t( 1, kb ), ldt, a( kb, kb ), lda,
365 $ dummy( 1, 1 ), 1, work, knb )
368 $ t( 1, kb ), ldt, a( kb, kb ), lda,
369 $ a( kb+knb, kb), lda, work, knb )
375 work( 1 ) = cmplx( lworkopt )
subroutine xerbla(srname, info)
subroutine clarfb_gett(ident, m, n, k, t, ldt, a, lda, b, ldb, work, ldwork)
CLARFB_GETT
subroutine claset(uplo, m, n, alpha, beta, a, lda)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine cungtsqr_row(m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
CUNGTSQR_ROW