mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
call Explicitly ::rint and ::rintf for targets without c++11. Without this, the Windows build breaks when trying to compile numext::rint<double>.
This commit is contained in:
parent
da5a7afed0
commit
e1ecfc162d
@ -450,11 +450,19 @@ struct rint_impl {
|
|||||||
|
|
||||||
#if !EIGEN_HAS_CXX11_MATH
|
#if !EIGEN_HAS_CXX11_MATH
|
||||||
template<>
|
template<>
|
||||||
|
struct rint_impl<double> {
|
||||||
|
EIGEN_DEVICE_FUNC
|
||||||
|
static inline double run(const double& x)
|
||||||
|
{
|
||||||
|
return ::rint(x);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
template<>
|
||||||
struct rint_impl<float> {
|
struct rint_impl<float> {
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
static inline float run(const float& x)
|
static inline float run(const float& x)
|
||||||
{
|
{
|
||||||
return rintf(x);
|
return ::rintf(x);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user