Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

from explicit QR to compact form?

Azua_Garcia__Giovann
864 Views

Hello,

I use LAPACK_dgeqrf to compute QR factorization and this one returns a compact representation in which the Q is not formed explicitly (I believe is in the WY compact form), then I use the documented two methods to use such compact QR to solve systems of equations.

I found an algorithm that updates the QR when blocks of rows are added to the corresponding matrix but this algorithm gives back a Q and R explicitly. Now I need to convert these explicitly formed Q and R into the compact form needed to interface with MKL or LAPACK.

Are there helper MKL functions to create the compact representation given the explicit Q and R?

TIA,
Best regards,
Giovanni

0 Kudos
2 Replies
Alexander_K_Intel3
864 Views
Hello Giovanni,

You could obtain the WY representation of explicitly formed Q by running DGEQRF on the Q. It will return you R equal to identity matrix and the same Q butin the compact form.

W.B.R.,
Alexander
0 Kudos
Azua_Garcia__Giovann
864 Views
Hello Alexander,

Thank you, that's smart :) a good tip indeed but I meant implicitly not having to recompute the QR from scratch. In any case I understood the in and outs of the representation so I would be able to modify it myself directly with updates i.e.

upper trapezoidal: R (including the diagonal)
lower: the householder/givens rotator column vectors v_i
tau: the householder coeffiencients t_i

I can build H = I - t_i*(v_i*v_i') this last bit is an outer product that makes a matrix.

I kind of started to understand how to manually update the QR addrows, addcols, delcols. My problem is translating whatever algorithm I can think of into something that can be most efficiently integrated with MKL.
There are some implementations I know:
http://www.maths.manchester.ac.uk/~clucas/updating/

but have had trouble integrating it, and besides they are general and my case is simpler e.g. my addcols is always append column at the end.

Best regards,
Giovanni
0 Kudos
Reply