mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 19:59:05 +08:00
Work around Emscripten bug - https://github.com/kripken/emscripten/issues/4088
This commit is contained in:
parent
72ab7879f7
commit
964a95bf5e
@ -531,7 +531,7 @@ template<>
|
|||||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||||
double sqrt(const double &x)
|
double sqrt(const double &x)
|
||||||
{
|
{
|
||||||
#if EIGEN_COMP_GNUC
|
#if EIGEN_COMP_GNUC && !defined(EMSCRIPTEN)
|
||||||
return internal::pfirst(internal::Packet2d(__builtin_ia32_sqrtsd(_mm_set_sd(x))));
|
return internal::pfirst(internal::Packet2d(__builtin_ia32_sqrtsd(_mm_set_sd(x))));
|
||||||
#else
|
#else
|
||||||
return internal::pfirst(internal::Packet2d(_mm_sqrt_pd(_mm_set_sd(x))));
|
return internal::pfirst(internal::Packet2d(_mm_sqrt_pd(_mm_set_sd(x))));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user