Re: [eigen] EigenLab: C++ run-time matrix math ala MATLAB.

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hello
On 31/8/14, 10:18, Marcel Goldschen wrote:
Hi all,
I've created a header only library called
EigenLab (https://github.com/marcel-goldschen-ohm/EigenLab
<https://github.com/marcel-goldschen-ohm/EigenLab>) which provides
run-time parsing/evaluation of matrix math expressions in C++ with a
....
what you think. Also, if anyone knows how I could improve its
performance by using Eigen's expression templates, I'd love to hear
about it.

I finally had time to try it out and it seems quite nice except it's very slow compared to muparserx. Parsing a simple expression (i + 1) 1e6 times on my laptop takes about 0.07 s with muparserx and 4.7 s with EigenLab using these test programs:
https://github.com/nasailja/pamhd/blob/master/tests/eigenlab/performance1.cpp
https://github.com/nasailja/pamhd/blob/master/tests/muparserx/performance1.cpp

The muparserx test only has to parse the expression once, would it be possible to do a similar optimization in eigenlab if the expression doesn't change but only the value(s) of variable(s)?

Also it would be nice to have a better error message for using a wrong index [v1(1) instead of v1(0)] in an expression than: Assertion failed: (a_startRow >= 0 && blockRows >= 0 && a_startRow <= xpr.rows() - blockRows && a_startCol >= 0 && blockCols >= 0 && a_startCol <= xpr.cols() - blockCols), function Block, file /Users/iljah/libraries/eigen/Eigen/src/Core/Block.h, line 146. This is far less important than performance though as currently I don't think I could use eigenlab in my program because even muparserx takes a few seconds.

Ilja



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/