Registered Member
|
Hello,
I am doing simple matrix manipulations (sum and inverse) for a small matrix 3*3. However, I need to do it millions of times. Is there any benchmark test on whether eigen is efficient for small matrix computations? Or I should write some simple function to this? Thanks |
Moderator
|
Yes Eigen is optimized for both small fixed sizes and large ones. For small objects, just make sure you specify the sizes at compile times (e.g., Matrix3f, Vector3d, Matrix<T,4,4>, etc.)
|
Registered Member
|
Is MatrixXf A(9,8) the same as Matrix<float,9,8> A?
|
Moderator
|
They are different. Matrix<float,9,8> is allocated on the stack and the operations on it might be unrolled because the sizes are known at compile time. However, for matrices larger than about 6x6 there is no clear advantage of using fixed sizes objects.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]