Jump to content

Eigen (C++ library): Difference between revisions

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> Enable fused multiply add
*<code>-march=native</code> and <code>-mtune=native</code> if running only locally
*<code>-mavx2</code> Enable avx2 vector instructions
**Otherwise, at a minimum
**<code>-mfma</code> Enable fused multiply add
**<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