Try to reduce compilation time/memory for GEBP kernel using EIGEN_IF_CONSTEXPR

This commit is contained in:
Rasmus Munk Larsen
2022-09-23 20:09:42 +00:00
parent 3c4637640b
commit 13b69fc1b0
3 changed files with 23 additions and 16 deletions

View File

@@ -1263,4 +1263,12 @@ bool all(T t, Ts ... ts){ return t && all(ts...); }
#define EIGEN_UNROLL_LOOP
#endif
// Notice: Use this macro with caution. The code in the if body should still
// compile with C++14.
#if defined(EIGEN_HAS_CXX17_IFCONSTEXPR)
#define EIGEN_IF_CONSTEXPR(X) if constexpr (X)
#else
#define EIGEN_IF_CONSTEXPR(X) if (X)
#endif
#endif // EIGEN_MACROS_H