separating QR factorisation from function gels?

separating QR factorisation from function gels?

Hi,

i want to implement an iterative algorithm that needs to solve one LLS-problem per iteration. The system matix A remains the same over all iterations, only b changes. The function "gels" does exactly what i need, but itperforms thea call to "geqrf" on every call.For performance reasons i would like to do the QR factorisation only once at the beginning of the algortithm and only change b from one iteration to the next.
Is this possible with gels? What happens if i provide a result from geqrf as parameter A to gels?
Which combination of functions do is have to use?

Thanks

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Hi Hillar,

Yes, gegrf and other several lapack functions combination can do this.

Actually, there are two kind ofLAPACK routine:
1)LAPACK computational routines . These routines perform distinct computational tasks
for example, geqrf do QR factorization.

2) driver routine , like gels
solves a complete problem. To arrive at the solution, driver routines typically call a sequence of appropriate computational routines.

Soyou may call computation rountines for your purpose.

As mkl reference manual discrible,
To solve a particular problem, you usually call several computational routines. Sometimes you need to combine the routines of this chapter with other LAPACK routines described in "LAPACK Routines: Linear Equations" as well as with BLAS routines described in "BLAS and Sparse BLAS Routines".

For example, to solve a set of least squares problems minimizing ||Ax - b||2 for all columns b of a given matrix B (where A and B are real matrices), you can call ?geqrf to form the factorization A = QR, then call ?ormqr to compute C = QHB and finally call the BLAS routine ?trsm to solve for X the system of equations RX = C.

Another way is to call an appropriate driver routine that performs several tasks in one call. For example, to solve the least squares problem the driver routine ?gels can be used.

Some forum users' problem for your reference: http://software.intel.com/en-us/forums/showthread.php?t=104541&o=a&s=lr

Best Regards,
Ying

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen