aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/SSE/TypeCasting.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-02-27 09:27:30 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-02-27 09:27:30 -0800
commit05089aba75f8bf1ab3d1bfd566decfc08ce729f9 (patch)
treeef866b5e9b4707a5e7c8a185c5868f9c795300f1 /Eigen/src/Core/arch/SSE/TypeCasting.h
parent573b377110d488886bfc6b319c140a3375d5d91a (diff)
Switch to truncated casting when converting floating point types to integer. This ensures that vectorized casts are consistent with scalar casts
Diffstat (limited to 'Eigen/src/Core/arch/SSE/TypeCasting.h')
-rw-r--r--Eigen/src/Core/arch/SSE/TypeCasting.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/arch/SSE/TypeCasting.h b/Eigen/src/Core/arch/SSE/TypeCasting.h
index 454f4d38d..c84893230 100644
--- a/Eigen/src/Core/arch/SSE/TypeCasting.h
+++ b/Eigen/src/Core/arch/SSE/TypeCasting.h
@@ -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);
}