120 DOUBLE PRECISION FUNCTION zqpt01( M, N, K, A, AF, LDA, TAU, JPVT,
129 INTEGER k, lda, lwork, m, n
133 COMPLEX*16 a( lda, * ), af( lda, * ), tau( * ),
140 DOUBLE PRECISION zero, one
141 parameter( zero = 0.0d0, one = 1.0d0 )
145 DOUBLE PRECISION norma
148 DOUBLE PRECISION rwork( 1 )
158 INTRINSIC dble, dcmplx, max, min
166 IF( lwork.LT.m*n+n )
THEN
167 CALL
xerbla(
'ZQPT01', 10 )
173 IF( m.LE.0 .OR. n.LE.0 )
176 norma =
zlange(
'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
zcopy( m, af( 1, j ), 1, work( ( j-1 )*m+1 ), 1 )
190 CALL
zunmqr(
'Left',
'No transpose', m, n, k, af, lda, tau, work,
191 $ m, work( m*n+1 ), lwork-m*n, info )
197 CALL
zaxpy( m, dcmplx( -one ), a( 1, jpvt( j ) ), 1,
198 $ work( ( j-1 )*m+1 ), 1 )
202 $ ( dble( max( m, n ) )*
dlamch(
'Epsilon' ) )