diff options
author | Antonio Sanchez <cantonios@google.com> | 2021-03-24 10:12:02 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2021-03-25 16:52:19 +0000 |
commit | 87729ea39ff22e0f949ca64ec372f381d9e39708 (patch) | |
tree | c6a96ccd709c3decd8425ccde898d706e57c56c6 /Eigen/src/Core/arch/Default/Half.h | |
parent | 748489ef9c885e05b0d8136447cc5bd7d6aef4dc (diff) |
Eliminate `round_impl` double-promotion warnings for c++03.
Diffstat (limited to 'Eigen/src/Core/arch/Default/Half.h')
-rw-r--r-- | Eigen/src/Core/arch/Default/Half.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Eigen/src/Core/arch/Default/Half.h b/Eigen/src/Core/arch/Default/Half.h index 56ff7cec3..9f8e8cc1e 100644 --- a/Eigen/src/Core/arch/Default/Half.h +++ b/Eigen/src/Core/arch/Default/Half.h @@ -718,9 +718,6 @@ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half floor(const half& a) { return half(::floorf(float(a))); #endif } -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half rint(const half& a) { - return half(::rintf(float(a))); -} EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half ceil(const half& a) { #if (EIGEN_CUDA_SDK_VER >= 80000 && defined EIGEN_CUDA_ARCH && EIGEN_CUDA_ARCH >= 300) || \ defined(EIGEN_HIP_DEVICE_COMPILE) @@ -729,6 +726,12 @@ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half ceil(const half& a) { return half(::ceilf(float(a))); #endif } +EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half rint(const half& a) { + return half(::rintf(float(a))); +} +EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half round(const half& a) { + return half(::roundf(float(a))); +} EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half fmod(const half& a, const half& b) { return half(::fmodf(float(a), float(b))); } |