Tapkee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
eigen3.hpp
Go to the documentation of this file.
1 #ifndef TAPKEE_DEFINES_EIGEN3_H_
2 #define TAPKEE_DEFINES_EIGEN3_H_
3 
5 #ifdef TAPKEE_EIGEN_INCLUDE_FILE
6  #include TAPKEE_EIGEN_INCLUDE_FILE
7 #else
8  #ifndef TAPKEE_DEBUG
9  #define EIGEN_NO_DEBUG
10  #endif
11  #define EIGEN_RUNTIME_NO_MALLOC
12  #include <Eigen/Eigen>
13  #include <Eigen/Dense>
14  #if EIGEN_VERSION_AT_LEAST(3,0,93)
15  #include <Eigen/Sparse>
16  #if defined(TAPKEE_SUPERLU_AVAILABLE) && defined(TAPKEE_USE_SUPERLU)
17  #include <Eigen/SuperLUSupport>
18  #endif
19  #else
20  #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
21  #include <unsupported/Eigen/SparseExtra>
22  #endif
23 #endif
24 
25 #ifdef EIGEN_RUNTIME_NO_MALLOC
26  #define RESTRICT_ALLOC Eigen::internal::set_is_malloc_allowed(false)
27  #define UNRESTRICT_ALLOC Eigen::internal::set_is_malloc_allowed(true)
28 #else
29  #define RESTRICT_ALLOC
30  #define UNRESTRICT_ALLOC
31 #endif
32 
34 #endif