mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Switch to truncated casting when converting floating point types to integer. This ensures that vectorized casts are consistent with scalar casts
This commit is contained in:
@@ -24,7 +24,7 @@ struct type_casting_traits<float, int> {
|
||||
};
|
||||
|
||||
template<> EIGEN_STRONG_INLINE Packet4i pcast<Packet4f, Packet4i>(const Packet4f& a) {
|
||||
return _mm_cvtps_epi32(a);
|
||||
return _mm_cvttps_epi32(a);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user