119 REAL function
sqpt01( m, n, k, a, af, lda, tau, jpvt,
127 INTEGER k, lda, lwork, m, n
131 REAL a( lda, * ), af( lda, * ), tau( * ),
139 parameter( zero = 0.0e0, one = 1.0e0 )
156 INTRINSIC max, min, real
164 IF( lwork.LT.m*n+n )
THEN
165 CALL xerbla(
'SQPT01', 10 )
171 IF( m.LE.0 .OR. n.LE.0 )
174 norma =
slange(
'One-norm', m, n, a, lda, rwork )
177 DO i = 1, min( j, m )
178 work( ( j-1 )*m+i ) = af( i, j )
181 work( ( j-1 )*m+i ) = zero
185 CALL scopy( m, af( 1, j ), 1, work( ( j-1 )*m+1 ), 1 )
188 CALL sormqr(
'Left',
'No transpose', m, n, k, af, lda, tau, work,
189 $ m, work( m*n+1 ), lwork-m*n, info )
195 CALL saxpy( m, -one, a( 1, jpvt( j ) ), 1, work( ( j-1 )*m+1 ),
200 $ ( real( max( m, n ) )*
slamch(
'Epsilon' ) )
subroutine xerbla(srname, info)
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
real function slamch(cmach)
SLAMCH
real function slange(norm, m, n, a, lda, work)
SLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
subroutine sormqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
SORMQR
real function sqpt01(m, n, k, a, af, lda, tau, jpvt, work, lwork)
SQPT01