Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

matrix inverse

JohnZhang
Nuevo Colaborador I
3.030 Vistas

I have used ?sytrf and ?sytri to do the inverse of a symmetric matrix (a covariance matrix). I realized that the algorithm only uses either the lower or the upper part of the matrix to do the inversion. So the result is only available in either the lower or upper part. To get the full inverse matrix, I need to do additional copy across. It is straightforward, but I wonder if there is a MKL or IPP routine to do that, as performance is really critical in my application.

As a background, I am trying to solve linear equations A*X=B by calculating the matrix inverse A^-1 beforehand. So the X=A^-1*B part only needs to worry about one matrix multiplication every time.

Thank you for any advice.

 

John

0 kudos
1 Solución
JohnZhang
Nuevo Colaborador I
2.946 Vistas

Thanks for the suggestion. I worked out a solution myself. I used the multiplication of symmetric matrix and vector to do the last step. This avoids the mirroring of the triangular part of the inverse matrix. Then I realized, all the naming convention of MKL routines are classified into , ge, sy, etc. So most of the functions have different versions that support either general matrix of symmetric matrix, etc. 

Ver la solución en mensaje original publicado

6 Respuestas
PrasanthD_intel
Moderador
3.000 Vistas

Hi John,


Thanks for reaching out to us,

As you wanted to solve a system of linear equations, you may use ?sytrs routine instead of ?sytri.

You can derive a factorized matrix using ?sytrf and use it in ?sytrs routine to obtain the unknown(X) matrix.


Thanks

Prasanth


PrasanthD_intel
Moderador
2.950 Vistas

Hi John,


We haven't heard back from you.

Let us know if the given solution works for you.


Regards

Prasanth


JohnZhang
Nuevo Colaborador I
2.947 Vistas

Thanks for the suggestion. I worked out a solution myself. I used the multiplication of symmetric matrix and vector to do the last step. This avoids the mirroring of the triangular part of the inverse matrix. Then I realized, all the naming convention of MKL routines are classified into , ge, sy, etc. So most of the functions have different versions that support either general matrix of symmetric matrix, etc. 

PrasanthD_intel
Moderador
2.923 Vistas

Hi John,


Glad you have found the solution.

If you don't have any other queries, let us know if we can close this thread.


Regards

Prasanth


JohnZhang
Nuevo Colaborador I
2.902 Vistas
PrasanthD_intel
Moderador
2.882 Vistas

Hi John,


Thanks for the confirmation.

As your issue has been resolved, we are closing this thread. If you require additional assistance from Intel, please start a new thread.


Regards

Prasanth


Responder