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 )
152 EXTERNAL clange, slamch
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 )
201 cqpt01 = clange(
'One-norm', m, n, work, m, rwork ) /
202 $ (
REAL( MAX( M, N ) )*slamch(
'Epsilon' ) )
real function cqpt01(M, N, K, A, AF, LDA, TAU, JPVT, WORK, LWORK)
CQPT01
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine cunmqr(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
CUNMQR
subroutine ccopy(N, CX, INCX, CY, INCY)
CCOPY
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY