174 SUBROUTINE cungtsqr( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
183 INTEGER INFO, LDA, LDT, LWORK, M, N, MB, NB
186 COMPLEX A( LDA, * ), T( LDT, * ), WORK( * )
193 parameter( cone = ( 1.0e+0, 0.0e+0 ),
194 $ czero = ( 0.0e+0, 0.0e+0 ) )
198 INTEGER IINFO, LDC, LWORKOPT, LC, LW, NBLOCAL, J
204 INTRINSIC cmplx, 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(
'CUNGTSQR', -info )
260 ELSE IF ( lquery )
THEN
261 work( 1 ) = cmplx( lworkopt )
267 IF( min( m, n ).EQ.0 )
THEN
268 work( 1 ) = cmplx( lworkopt )
283 CALL claset(
'F', m, n, czero, cone, work, ldc )
290 CALL clamtsqr(
'L',
'N', m, n, n, mb, nblocal, a, lda, t, ldt,
291 $ work, ldc, work( lc+1 ), lw, iinfo )
298 CALL ccopy( m, work( (j-1)*ldc + 1 ), 1, a( 1, j ), 1 )
301 work( 1 ) = cmplx( lworkopt )
subroutine xerbla(srname, info)
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine clamtsqr(side, trans, m, n, k, mb, nb, a, lda, t, ldt, c, ldc, work, lwork, info)
CLAMTSQR
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(m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
CUNGTSQR