diff --git a/Eigen/src/Core/arch/NEON/Complex.h b/Eigen/src/Core/arch/NEON/Complex.h index c7fb12fe8..60ab56a47 100644 --- a/Eigen/src/Core/arch/NEON/Complex.h +++ b/Eigen/src/Core/arch/NEON/Complex.h @@ -114,7 +114,7 @@ template<> EIGEN_STRONG_INLINE void pstoreu >(std::complex EIGEN_DEVICE_FUNC inline Packet2cf pgather, Packet2cf>(const std::complex* from, Index stride) { - Packet4f res; + Packet4f res = pset1(0.f); res = vsetq_lane_f32(std::real(from[0*stride]), res, 0); res = vsetq_lane_f32(std::imag(from[0*stride]), res, 1); res = vsetq_lane_f32(std::real(from[1*stride]), res, 2); @@ -365,7 +365,7 @@ template<> EIGEN_STRONG_INLINE void prefetch >(const std::c template<> EIGEN_DEVICE_FUNC inline Packet1cd pgather, Packet1cd>(const std::complex* from, Index stride) { - Packet2d res; + Packet2d res = pset1(0.0); res = vsetq_lane_f64(std::real(from[0*stride]), res, 0); res = vsetq_lane_f64(std::imag(from[0*stride]), res, 1); return Packet1cd(res); diff --git a/Eigen/src/Core/arch/NEON/PacketMath.h b/Eigen/src/Core/arch/NEON/PacketMath.h index ce0abfd80..348c14f07 100644 --- a/Eigen/src/Core/arch/NEON/PacketMath.h +++ b/Eigen/src/Core/arch/NEON/PacketMath.h @@ -252,7 +252,7 @@ template<> EIGEN_STRONG_INLINE void pstoreu(int* to, const Packet4i& f template<> EIGEN_DEVICE_FUNC inline Packet4f pgather(const float* from, Index stride) { - Packet4f res; + Packet4f res = pset1(0.f); res = vsetq_lane_f32(from[0*stride], res, 0); res = vsetq_lane_f32(from[1*stride], res, 1); res = vsetq_lane_f32(from[2*stride], res, 2); @@ -637,7 +637,7 @@ template<> EIGEN_STRONG_INLINE void pstoreu(double* to, const Packet2d& template<> EIGEN_DEVICE_FUNC inline Packet2d pgather(const double* from, Index stride) { - Packet2d res; + Packet2d res = pset1(0.0); res = vsetq_lane_f64(from[0*stride], res, 0); res = vsetq_lane_f64(from[1*stride], res, 1); return res;