More NEON packetmath fixes.

This commit is contained in:
Antonio Sánchez 2023-02-14 21:45:25 +00:00
parent c15b386203
commit 384269937f
2 changed files with 5 additions and 5 deletions

View File

@ -90,8 +90,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
@ -3744,7 +3744,7 @@ EIGEN_ALWAYS_INLINE Packet2d make_packet2d(double a, double b) {
typedef float64x2_t Packet2d;
typedef float64x1_t Packet1d;
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

@ -43,7 +43,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) {
@ -1375,7 +1375,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);
}