[eigen] Getting started / Compiling and running your first program

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


Hi,

http://eigen.tuxfamily.org/dox/GettingStarted.html

in section
Compiling and running your first program
suggests

g++ -I /path/to/eigen/ my_program.cpp -o my_program


How about also suggesting an example with typical release compile
flags? Something like:

g++ -I /path/to/eigen/ my_program.cpp -o my_program -O2 -DNDEBUG
-march=native -mtune=native


Not sure whether it would really save any beginner from unknowingly
benchmarking different linear algebra libraries in debug mode, but at
least we can try. (I just read such a benchmarking report, with Eigen
and PETSc as the libraries... As you can imagine, the C library had
some speed advantages over the C++ template library under those
circumstances.)

Regards,
Thomas



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