120 REAL FUNCTION cqpt01( M, N, K, A, AF, LDA, TAU, JPVT,
129 INTEGER k, lda, lwork, m, n
133 COMPLEX a( lda, * ), af( lda, * ), tau( * ),
141 parameter( zero = 0.0e0, one = 1.0e0 )
158 INTRINSIC cmplx, max, min, real
166 IF( lwork.LT.m*n+n )
THEN
167 CALL
xerbla(
'CQPT01', 10 )
173 IF( m.LE.0 .OR. n.LE.0 )
176 norma =
clange(
'One-norm', m, n, a, lda, rwork )
179 DO 10 i = 1, min( j, m )
180 work( ( j-1 )*m+i ) = af( i, j )
183 work( ( j-1 )*m+i ) = zero
187 CALL
ccopy( m, af( 1, j ), 1, work( ( j-1 )*m+1 ), 1 )
190 CALL
cunmqr(
'Left',
'No transpose', m, n, k, af, lda, tau, work,
191 $ m, work( m*n+1 ), lwork-m*n, info )
197 CALL
caxpy( m, cmplx( -one ), a( 1, jpvt( j ) ), 1,
198 $ work( ( j-1 )*m+1 ), 1 )
202 $ (
REAL( MAX( M, N ) )*
slamch(
'Epsilon' ) )