F1sher
F1sher

Reputation: 7310

Is it possible to build Eigen lib for C++ instead of using pre-built files?

I am using pre-built 3.2.5 Eigen lib files, downloaded from website: http://eigen.tuxfamily.org/index.php?title=Main_Page

I heard if I built the files by myself on my PC I could achieve higher compatibility with my processor what would lead to slight increase of lib's performance. Currently I am struggling with eigensolver calculation time being too long.

I use Visual Studio 2005 and I just add Eigen files location to my projects properties linker.

Is there any way to build those files myself on my platform? I am a bit confused how could I do it. Is it related to CMake?

Upvotes: 0

Views: 2501

Answers (1)

Avi Ginsburg
Avi Ginsburg

Reputation: 10596

There is no library to build, as Eigen is a "pure template header library". From the main site:

Requirements

Eigen doesn't have any dependencies other than the C++ standard library.

We use the CMake build system, but only to build the documentation and unit-tests, and to automate installation. If you just want to use Eigen, you can use the header files right away. There is no binary library to link to, and no configured header file. Eigen is a pure template library defined in the headers.

You don't need to add the files location to the linker, but to the (additional) included directories in your project or to a property sheet.

Regarding calculation time, make sure you're running in Release and not Debug. There is a difference of about 100 in the speed. Also, make sure that optimizations are turned on (/O2 or /Ox).

Upvotes: 6

Related Questions