123subroutine cqr1up(m,n,k,Q,ldq,R,ldr,u,v,w,rw)
127 integer,
intent(in) :: m, n, k, ldq, ldr
128 complex(real32),
intent(inout) :: Q(ldq,*)
129 complex(real32),
intent(inout) :: R(ldr,*)
130 complex(real32),
intent(inout) :: u(*)
131 complex(real32),
intent(inout) :: v(*)
132 complex(real32),
intent(out) :: w(*)
133 real(real32),
intent(out) :: rw(*)
134 external cch1up, cqrqh,cqhqr,cqrot,cqrtv1,caxcpy
135 external caxpy,scnrm2,slamch,csscal,crot
136 real(real32) scnrm2,slamch,ru,ruu
140 if (k == 0 .or. n == 0)
return
147 else if (k /= m .and. (k /= n .or. n > m))
then
149 else if (ldq < m)
then
151 else if (ldr < k)
then
161 if (.not.full) ru = scnrm2(m,u,1)
165 if (.not.full)
call caxpy(m,-w(i),q(1,i),1,u,1)
170 call cqrqh(k,n,r,ldr,rw,w(2))
172 call cqrot(
'B',m,k,q,ldq,rw,w(2))
174 call caxcpy(n,w(1),v,1,r(1,1),ldr)
176 call cqhqr(k,n,r,ldr,rw,w)
178 call cqrot(
'F',m,min(k,n+1),q,ldq,rw,w)
183 ru = ru * slamch(
'e')
184 if (ruu <= ru)
return
186 call csscal(n,ruu,v,1)
187 call csscal(m,1e0/ruu,u,1)
190 call crot(m,q(1,i),1,u,1,rw(i),conjg(v(i)))
subroutine caxcpy(n, a, x, incx, y, incy)
Performs scaled conjugate vector addition.
subroutine cch1up(n, r, ldr, u, w)
Updates a Cholesky factorization after a rank-1 modification.
subroutine qrupdate_xerror(srname, info)
Dispatches error reporting to the handler.
subroutine cqrot(dir, m, n, q, ldq, c, s)
Applies a sequence of Givens rotations from the right to a matrix.
subroutine cqrtv1(n, u, w)
Generates Givens rotations to eliminate all but the first element of a vector.
subroutine cqr1up(m, n, k, q, ldq, r, ldr, u, v, w, rw)
Updates a QR factorization after a rank-1 modification.
subroutine cqhqr(m, n, r, ldr, c, s)
Reduces an upper Hessenberg matrix to upper trapezoidal form.
subroutine cqrqh(m, n, r, ldr, c, s)
Converts an upper trapezoidal matrix to upper Hessenberg form.
Module for custom error handling.