Eigen (C++ library): Difference between revisions

From David's Wiki
No edit summary
Line 8: Line 8:
For optimal performance, I recommend using the following flags when compiling.<br>
For optimal performance, I recommend using the following flags when compiling.<br>
====GCC====
====GCC====
*<code>-mfma</code> Enabled fused multiply add
*<code>-mfma</code> Enable fused multiply add
*<code>-mavx2</code> Enable avx2 vector instructions
*<code>-mavx2</code> Enable avx2 vector instructions
*<code>-DEIGEN_NO_DEBUG</code> Set preprocessor define for eigen optimizations
*<code>-DEIGEN_NO_DEBUG</code> Set preprocessor define for eigen optimizations
*<code>-fopenmp</code> OpenMP parallel execution
*<code>-fopenmp</code> OpenMP parallel execution

Revision as of 19:35, 1 October 2019

Eigen is a template header-only C++ linear algebra library. It is one of the fastest and most popular.

Website

Usage

Compilation

Reference
For optimal performance, I recommend using the following flags when compiling.

GCC

  • -mfma Enable fused multiply add
  • -mavx2 Enable avx2 vector instructions
  • -DEIGEN_NO_DEBUG Set preprocessor define for eigen optimizations
  • -fopenmp OpenMP parallel execution