More NEON packetmath fixes.

(cherry picked from commit 384269937f707669fb1ab65bee7e9bfca2c2dfa1)
This commit is contained in:
Antonio Sánchez 2023-02-14 21:45:25 +00:00 committed by C. Antonio Sanchez
parent 1426855b68
commit be62728876
2 changed files with 5 additions and 5 deletions

View File

@ -88,8 +88,8 @@ typedef uint32x4_t Packet4ui;
typedef int64x2_t Packet2l;
typedef uint64x2_t Packet2ul;
EIGEN_ALWAYS_INLINE Packet4f make_packet4f(float a, float b, float c, float d) { return {a, b, c, d}; }
EIGEN_ALWAYS_INLINE Packet2f make_packet2f(float a, float b) { return {a, b}; }
EIGEN_ALWAYS_INLINE Packet4f make_packet4f(float a, float b, float c, float d) { return Packet4f{a, b, c, d}; }
EIGEN_ALWAYS_INLINE Packet2f make_packet2f(float a, float b) { return Packet2f{a, b}; }
#endif // EIGEN_COMP_MSVC_STRICT
@ -3694,7 +3694,7 @@ EIGEN_ALWAYS_INLINE Packet2d make_packet2d(double a, double b) {
return vld1q_f64(from);
}
EIGEN_ALWAYS_INLINE Packet2d make_packet2d(double a, double b) { return {a, b}; }
EIGEN_ALWAYS_INLINE Packet2d make_packet2d(double a, double b) { return Packet2d{a, b}; }
#endif

View File

@ -41,7 +41,7 @@ EIGEN_STRONG_INLINE Packet4c preinterpret<Packet4c, Packet4uc>(const Packet4uc&
}
template <>
EIGEN_STRONG_INLINE Packet8c preinterpret<Packet8c, Packet8uc>(const Packet8uc& a) {
return Packet8c(preinterpret<Packet8c>(a));
return Packet8c(vreinterpret_s8_u8(a));
}
template <>
EIGEN_STRONG_INLINE Packet16c preinterpret<Packet16c, Packet16uc>(const Packet16uc& a) {
@ -1373,7 +1373,7 @@ struct type_casting_traits<numext::uint16_t, double> {
template <>
EIGEN_STRONG_INLINE Packet2d pcast<Packet8us, Packet2d>(const Packet8us& a) {
// Discard all but first two values.
Packet2f tmp = pcast<Packet4us, Packet2f>(vget_low_s16(a));
Packet2f tmp = pcast<Packet4us, Packet2f>(vget_low_u16(a));
return vcvt_f64_f32(tmp);
}