Use EIGEN_NOT_A_MACRO macro (oh the irony!) to avoid build issue in TensorFlow.

This commit is contained in:
Rasmus Munk Larsen 2023-03-15 11:42:57 -07:00
parent 690ae9502f
commit f02856c640

View File

@ -897,7 +897,7 @@ EIGEN_DEVICE_FUNC std::enable_if_t<(std::numeric_limits<T>::has_infinity || std:
bool> bool>
isfinite_impl(const T& x) { isfinite_impl(const T& x) {
EIGEN_USING_STD(isfinite); EIGEN_USING_STD(isfinite);
return (isfinite)(x); return isfinite EIGEN_NOT_A_MACRO (x);
} }
template <typename T> template <typename T>
@ -911,7 +911,7 @@ EIGEN_DEVICE_FUNC std::enable_if_t<
(std::numeric_limits<T>::has_infinity && !NumTraits<T>::IsComplex), bool> (std::numeric_limits<T>::has_infinity && !NumTraits<T>::IsComplex), bool>
isinf_impl(const T& x) { isinf_impl(const T& x) {
EIGEN_USING_STD(isinf); EIGEN_USING_STD(isinf);
return (isinf)(x); return isinf EIGEN_NOT_A_MACRO (x);
} }
template <typename T> template <typename T>
@ -930,7 +930,7 @@ EIGEN_DEVICE_FUNC
bool> bool>
isnan_impl(const T& x) { isnan_impl(const T& x) {
EIGEN_USING_STD(isnan); EIGEN_USING_STD(isnan);
return (isnan)(x); return isnan EIGEN_NOT_A_MACRO (x);
} }
// The following overload are defined at the end of this file // The following overload are defined at the end of this file