mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-09 10:19:01 +08:00
Use truncation rather than rounding when casting Packet2d to Packet2l.
This commit is contained in:
parent
7b5d32b7c9
commit
4dccaa587e
@ -89,7 +89,7 @@ EIGEN_STRONG_INLINE Packet4i pcast<Packet2d, Packet4i>(const Packet2d& a, const
|
||||
template <>
|
||||
EIGEN_STRONG_INLINE Packet2l pcast<Packet2d, Packet2l>(const Packet2d& a) {
|
||||
#if EIGEN_ARCH_x86_64
|
||||
return _mm_set_epi64x(_mm_cvtsd_si64(preverse(a)), _mm_cvtsd_si64(a));
|
||||
return _mm_set_epi64x(_mm_cvttsd_si64(preverse(a)), _mm_cvttsd_si64(a));
|
||||
#else
|
||||
return _mm_set_epi64x(static_cast<int64_t>(pfirst(preverse(a))), static_cast<int64_t>(pfirst(a)));
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user