Fix EIGEN_OPTIMIZATION_BARRIER for clang-cl

This commit is contained in:
Antonio Sanchez 2025-07-31 17:02:43 +00:00
parent f5ead2d34c
commit e4493233e8

View File

@ -993,7 +993,8 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void ignore_unused_variable(cons
#endif
#if !defined(EIGEN_OPTIMIZATION_BARRIER)
#if EIGEN_COMP_GNUC
// Implement the barrier on GNUC compilers or clang-cl.
#if EIGEN_COMP_GNUC || (defined(__clang__) && defined(_MSC_VER))
// According to https://gcc.gnu.org/onlinedocs/gcc/Constraints.html:
// X: Any operand whatsoever.
// r: A register operand is allowed provided that it is in a general