mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-03 17:24:11 +08:00
Fix compilation on old gcc+AVX
This commit is contained in:
parent
8dca9f97e3
commit
7cae8918c0
@ -524,7 +524,7 @@ template<>
|
|||||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||||
float sqrt(const float &x)
|
float sqrt(const float &x)
|
||||||
{
|
{
|
||||||
return internal::pfirst(_mm_sqrt_ss(_mm_set_ss(x)));
|
return internal::pfirst(internal::Packet4f(_mm_sqrt_ss(_mm_set_ss(x))));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
@ -532,9 +532,9 @@ EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
|||||||
double sqrt(const double &x)
|
double sqrt(const double &x)
|
||||||
{
|
{
|
||||||
#if EIGEN_COMP_GNUC
|
#if EIGEN_COMP_GNUC
|
||||||
return internal::pfirst(__builtin_ia32_sqrtsd(_mm_set_sd(x)));
|
return internal::pfirst(internal::Packet2d(__builtin_ia32_sqrtsd(_mm_set_sd(x))));
|
||||||
#else
|
#else
|
||||||
return internal::pfirst(_mm_sqrt_pd(_mm_set_sd(x)));
|
return internal::pfirst(internal::Packet2d(_mm_sqrt_pd(_mm_set_sd(x))));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user