![]() Registered Member ![]()
|
I am hoping to load a program which uses Eigen onto a microcontroller with limited memory. I am only using the core, LU, and Cholsky headers, which puts the binary at about 400kb without using any compiler optimization; about 200k with -Os. I don't include any other libs. might anyone have any general advice for further reduction of static code size?
|
![]() Moderator ![]()
|
I think that enabling inlining (-O2) is also very important to help the compiler removing boilerplate code.
|
![]() Moderator ![]()
|
If your matrices are not very large, you might also compile with:
-D__CUDACC__ -D__host__=" " -D__device__=" " (using the devel branch). This will disable the heavy matrix product code. The following example:
takes 47k with the devel branch and:
and 65k without the "CUDA" trick and Eigen 3.2. |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]