172 SUBROUTINE cungtsqr( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
181 INTEGER INFO, LDA, LDT, LWORK, M, N, MB, NB
184 COMPLEX A( LDA, * ), T( LDT, * ), WORK( * )
191 parameter( cone = ( 1.0e+0, 0.0e+0 ),
192 $ czero = ( 0.0e+0, 0.0e+0 ) )
196 INTEGER IINFO, LDC, LWORKOPT, LC, LW, NBLOCAL, J
202 INTRINSIC cmplx, max, min
212 ELSE IF( n.LT.0 .OR. m.LT.n )
THEN
214 ELSE IF( mb.LE.n )
THEN
216 ELSE IF( nb.LT.1 )
THEN
218 ELSE IF( lda.LT.max( 1, m ) )
THEN
220 ELSE IF( ldt.LT.max( 1, min( nb, n ) ) )
THEN
228 IF( lwork.LT.2 .AND. (.NOT.lquery) )
THEN
234 nblocal = min( nb, n )
246 IF( ( lwork.LT.max( 1, lworkopt ) ).AND.(.NOT.lquery) )
THEN
256 CALL xerbla(
'CUNGTSQR', -info )
258 ELSE IF ( lquery )
THEN
259 work( 1 ) = cmplx( lworkopt )
265 IF( min( m, n ).EQ.0 )
THEN
266 work( 1 ) = cmplx( lworkopt )
281 CALL claset(
'F', m, n, czero, cone, work, ldc )
288 CALL clamtsqr(
'L',
'N', m, n, n, mb, nblocal, a, lda, t, ldt,
289 $ work, ldc, work( lc+1 ), lw, iinfo )
296 CALL ccopy( m, work( (j-1)*ldc + 1 ), 1, a( 1, j ), 1 )
299 work( 1 ) = cmplx( lworkopt )
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