From e559701981c1b656a3d1c9e693b6cdc28becfc10 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Thu, 28 Oct 2021 08:23:19 -0700 Subject: [PATCH] Fix compile issue for gcc 4.8 --- Eigen/src/Core/arch/Default/BFloat16.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Eigen/src/Core/arch/Default/BFloat16.h b/Eigen/src/Core/arch/Default/BFloat16.h index d0666effa..eb8d40aee 100644 --- a/Eigen/src/Core/arch/Default/BFloat16.h +++ b/Eigen/src/Core/arch/Default/BFloat16.h @@ -46,12 +46,13 @@ namespace Eigen { struct bfloat16; +namespace numext { template <> -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 numext::bit_cast(const uint16_t& src); +EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bit_cast(const uint16_t& src); template <> -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC uint16_t numext::bit_cast(const Eigen::bfloat16& src); - +EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC uint16_t bit_cast(const Eigen::bfloat16& src); +} // namespace numext namespace bfloat16_impl { #if defined(EIGEN_USE_HIP_BF16)