From f93841b53ef83460348b19d3b0e82a96a81cd05c Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Fri, 2 Oct 2020 14:47:15 -0700 Subject: [PATCH] Use EIGEN_USING_STD to fix CUDA compilation error on BFloat16.h. --- Eigen/src/Core/arch/Default/BFloat16.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/arch/Default/BFloat16.h b/Eigen/src/Core/arch/Default/BFloat16.h index 8706c992a..7c147ae34 100644 --- a/Eigen/src/Core/arch/Default/BFloat16.h +++ b/Eigen/src/Core/arch/Default/BFloat16.h @@ -485,10 +485,12 @@ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC float bfloat16_to_float(__bfloat16_raw h) // --- standard functions --- EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isinf)(const bfloat16& a) { - return std::isinf EIGEN_NOT_A_MACRO(float(a)); + EIGEN_USING_STD(isinf); + return (isinf)(float(a)); } EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isnan)(const bfloat16& a) { - return std::isnan EIGEN_NOT_A_MACRO(float(a)); + EIGEN_USING_STD(isnan); + return (isnan)(float(a)); } EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isfinite)(const bfloat16& a) { return !(isinf EIGEN_NOT_A_MACRO (a)) && !(isnan EIGEN_NOT_A_MACRO (a));