From 881b90e98483c8ec8dcb900efb2c681854e46d48 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Tue, 4 Oct 2016 08:23:38 -0700 Subject: Use explicit type casting to generate packets of zeros. --- Eigen/src/Core/ProductEvaluators.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Eigen/src/Core/ProductEvaluators.h') diff --git a/Eigen/src/Core/ProductEvaluators.h b/Eigen/src/Core/ProductEvaluators.h index 468e531cb..63faca822 100644 --- a/Eigen/src/Core/ProductEvaluators.h +++ b/Eigen/src/Core/ProductEvaluators.h @@ -639,7 +639,7 @@ struct etor_product_packet_impl { static EIGEN_STRONG_INLINE void run(Index /*row*/, Index /*col*/, const Lhs& /*lhs*/, const Rhs& /*rhs*/, Index /*innerDim*/, Packet &res) { - res = pset1(0); + res = pset1(typename unpacket_traits::type(0)); } }; @@ -648,7 +648,7 @@ struct etor_product_packet_impl { static EIGEN_STRONG_INLINE void run(Index /*row*/, Index /*col*/, const Lhs& /*lhs*/, const Rhs& /*rhs*/, Index /*innerDim*/, Packet &res) { - res = pset1(0); + res = pset1(typename unpacket_traits::type(0)); } }; @@ -657,7 +657,7 @@ struct etor_product_packet_impl { static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index innerDim, Packet& res) { - res = pset1(0); + res = pset1(typename unpacket_traits::type(0)); for(Index i = 0; i < innerDim; ++i) res = pmadd(pset1(lhs.coeff(row, i)), rhs.template packet(i, col), res); } @@ -668,7 +668,7 @@ struct etor_product_packet_impl { static EIGEN_STRONG_INLINE void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, Index innerDim, Packet& res) { - res = pset1(0); + res = pset1(typename unpacket_traits::type(0)); for(Index i = 0; i < innerDim; ++i) res = pmadd(lhs.template packet(row, i), pset1(rhs.coeff(i, col)), res); } -- cgit v1.2.3