Registered Member
|
Hello
I am working on a 241x241 double matrix and a 241 vector. I want to solve Ax=b, where b is unknown. The matrix is positive definite and is suitable for Cholesky. In my Eigen code I write the following:
I am using an ARM Cortex A9 and it takes 40ms to execute this code. Can someone verify that this is as quick as I can get? I expected quicker as my own written code also executes in 40ms. I was hoping that Eigen would be quicker than me. I am using O3 optimisation with NEON supported and the -DNDEBUG flag set, although as the NEON for the A9 only supports single precision, I am not sure that this is in use. Can I do anything else to make it quicker? I was hoping for around 20ms. |
Moderator
|
Indeed, NEON supports only single precision so you're loosing Eigen's SIMD capabilities. If your matrices are well conditioned you might try using float and/or Eigen's LLT factorization which has the advantage to leverage matrix-matrix operations instead of matrix-vector ones.
|
Registered Member
|
Using LLT, I got speeds of 13.9ms. I will need to check if this is good enough. I don't know yet the differences between LLT and LDLT But that 13.9ms is very good, better than I expected.
|
Moderator
|
LDLT does numerical pivoting thus its superior numerical stability. LDLT can also handle indefinite matrices. If your matrices are positive definite, then LLT should be fine.
|
Registered Member
|
Just one more thing regarding Cholesky. Does anyone know if it supports complex numbers too? Will that be slower?
|
Registered Member
|
Yes, it supports complex numbers. And yes, it will be slower. |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell