Registered Member
|
Hello,
I'm comparing our rather naive LA implementation with Eigen. We want to solve a linear system like A x = b, with x being a matrix Z and b being the unity matrix I. Afterward we perform some matrix matrix multiplication Dimensions are n = 9600, m = 20. With Eigen we do like that:
The householderQr took 3600ms. The multiplication took 1970ms which is much faster then with our own implementation which 5040ms took. But the QR decomposition took just 50m in hour implementation. We used another methods, but I wonder how can I optimize Eigen further, especially by exploiting the unity matrix at th rhs. That's how we did it the QR: QR:
So we exploit that the right hand side is the unity matrix here and it runs blazingly fast. How can I optimize Eigen towards that? I looked into triangularView but was not able to make it work. Thanks for any idea! |
Moderator
|
You should extract the thinQ first:
and then you can either compute Z as:
or better not explicitly compute the pseudo inverse of V but rather apply solve to the right:
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]