174 SUBROUTINE zungtsqr( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
183 INTEGER INFO, LDA, LDT, LWORK, M, N, MB, NB
186 COMPLEX*16 A( LDA, * ), T( LDT, * ), WORK( * )
192 COMPLEX*16 CONE, CZERO
193 parameter( cone = ( 1.0d+0, 0.0d+0 ),
194 $ czero = ( 0.0d+0, 0.0d+0 ) )
198 INTEGER IINFO, LDC, LWORKOPT, LC, LW, NBLOCAL, J
204 INTRINSIC dcmplx, max, min
214 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
216 ELSE IF( mb.LE.n )
THEN
218 ELSE IF( nb.LT.1 )
THEN
220 ELSE IF( lda.LT.max( 1, m ) )
THEN
222 ELSE IF( ldt.LT.max( 1, min( nb, n ) ) )
THEN
230 IF( lwork.LT.2 .AND. (.NOT.lquery) )
THEN
236 nblocal = min( nb, n )
248 IF( ( lwork.LT.max( 1, lworkopt ) ).AND.(.NOT.lquery) )
THEN
258 CALL xerbla(
'ZUNGTSQR', -info )
260 ELSE IF ( lquery )
THEN
261 work( 1 ) = dcmplx( lworkopt )
267 IF( min( m, n ).EQ.0 )
THEN
268 work( 1 ) = dcmplx( lworkopt )
283 CALL zlaset(
'F', m, n, czero, cone, work, ldc )
290 CALL zlamtsqr(
'L',
'N', m, n, n, mb, nblocal, a, lda, t, ldt,
291 $ work, ldc, work( lc+1 ), lw, iinfo )
298 CALL zcopy( m, work( (j-1)*ldc + 1 ), 1, a( 1, j ), 1 )
301 work( 1 ) = dcmplx( lworkopt )
subroutine xerbla(srname, info)
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zlamtsqr(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
ZLAMTSQR
subroutine zlaset(uplo, m, n, alpha, beta, a, lda)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine zungtsqr(m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
ZUNGTSQR