![]() Registered Member ![]()
|
is it possible to do this in Eigen so it can be faster than calling GEMM in MKL
R.transpose() * C * R where R = triangular matrix (n, n) C = symmetric matrix (n, n) n = dynamic unsigned int in the range of [1000, 10000] i tried something aloong R.tranpose().triangularView<Upper>() * C.selfadjointView(Upper) * R.triangularView<Lower>() but i have been facing compilation error. What is the way to express this operation in Eigen? What if we also make the assumption that R is sparse and C is dense? Thanks. |
![]() Moderator ![]()
|
Currently the best you can do is the following:
tmp = R.transpose().triangularView<Upper>() * C; result = tmp * R.triangularView<Lower>(); In the future, you should be able to exploit the fact that result is symmetric. Currently that's only possible is both factors are dense (not triangular). If R is very sparse, like ~10 non zeros per row, then you can use a SparseMatrix. |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell