Preprocessor directives

You can control some aspects of Eigen by defining the preprocessor tokens using #define. These macros should be defined before any Eigen headers are included. Often they are best set in the project options.

This page lists the preprocessor tokens recognized by Eigen.

Macros with major effects

These macros have a major effect and typically break the API (Application Programming Interface) and/or the ABI (Application Binary Interface). This can be rather dangerous: if parts of your program are compiled with one option, and other parts (or libraries that you use) are compiled with another option, your program may fail to link or exhibit subtle bugs. Nevertheless, these options can be useful for people who know what they are doing.

C++ standard features

By default, Eigen strive to automatically detect and enable langage features at compile-time based on the information provided by the compiler.

Individual features can be explicitly enabled or disabled by defining the following token to 0 or 1 respectively. For instance, one might limit the C++ version to C++03 by defining EIGEN_MAX_CPP_VER=03, but still enable C99 math functions by defining EIGEN_HAS_C99_MATH=1.

Assertions

The Eigen library contains many assertions to guard against programming errors, both at compile time and at run time. However, these assertions do cost time and can thus be turned off.

Alignment, vectorization and performance tweaking

Plugins

It is possible to add new methods to many fundamental classes in Eigen by writing a plugin. As explained in the section Extending MatrixBase (and other classes), the plugin is specified by defining a EIGEN_xxx_PLUGIN macro. The following macros are supported; none of them are defined by default.

Macros for Eigen developers

These macros are mainly meant for people developing Eigen and for testing purposes. Even though, they might be useful for power users and the curious for debugging and testing purpose, they should not be used by real-word code.



gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:43