You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting in LAPACK v3.12.0, there is a routine geqp3rk (double precision subroutine here), that performs a truncated QR factorization based on of three stopping conditions:
kmax: if an integer kmax is provided, it provides a QR factorization truncated at kmax columns, i.e. its the same as pqrfact(A; sketch=:none, rank = kmax)
abstol: if provided stops when pivot element has value less than the tolerance, similar to pqrfact(A; sketch=:none, atol = abstol)
reltol: similar to above but uses reltol instead, similar to pqrfact(A; sketch=:none, rtol = reltol)
That is, there is now a lapack routine to do exactly what perfect does.
I think we should be using this going forward, since it seems to be a little bit faster than the Julia native implementation that is the function geqp3_adap_main!.
There is one major caveat: I am still not sure why but the R factor differs a little when the stopping criteria are abstol or reltol. Submitting a PR related to this.
The text was updated successfully, but these errors were encountered:
Okay so it seems the discrepancy in the factor R is only due to the permutation of the columns after the numerical rank. In the image below, jpvt is the permutation vector produced from my implementation, and lra.p is the permutation from pqrfact(). Similarly, triu(Ap[1:rnk, :]) is the R factor from my implementation, and lra.R is from pqrfact
Starting in LAPACK v3.12.0, there is a routine
geqp3rk
(double precision subroutine here), that performs a truncated QR factorization based on of three stopping conditions:kmax
: if an integerkmax
is provided, it provides a QR factorization truncated atkmax
columns, i.e. its the same aspqrfact(A; sketch=:none, rank = kmax)
abstol
: if provided stops when pivot element has value less than the tolerance, similar topqrfact(A; sketch=:none, atol = abstol)
reltol
: similar to above but usesreltol
instead, similar topqrfact(A; sketch=:none, rtol = reltol)
That is, there is now a lapack routine to do exactly what
perfect
does.I think we should be using this going forward, since it seems to be a little bit faster than the Julia native implementation that is the function
geqp3_adap_main!
.There is one major caveat: I am still not sure why but the
R
factor differs a little when the stopping criteria areabstol
orreltol
. Submitting a PR related to this.The text was updated successfully, but these errors were encountered: