Fix compilation problems with PacketI on PowerPC.

This commit is contained in:
Chip Kerchner 2024-04-18 14:55:15 +00:00 committed by Antonio Sánchez
parent fcaf03ef7c
commit ad452e575d
2 changed files with 19 additions and 1 deletions

View File

@ -3201,6 +3201,7 @@ struct packet_traits<double> : default_packet_traits {
template <>
struct unpacket_traits<Packet2d> {
typedef double type;
typedef Packet2l integer_packet;
enum {
size = 2,
alignment = Aligned16,
@ -3210,6 +3211,17 @@ struct unpacket_traits<Packet2d> {
};
typedef Packet2d half;
};
template <>
struct unpacket_traits<Packet2l> {
typedef int64_t type;
enum {
size = 2,
alignment = Aligned16,
vectorizable = true,
masked_load_available = false,
masked_store_available = false
};
};
inline std::ostream& operator<<(std::ostream& s, const Packet2l& v) {
union {
@ -3259,6 +3271,11 @@ EIGEN_STRONG_INLINE Packet2d pset1<Packet2d>(const double& from) {
Packet2d v = {from, from};
return v;
}
template <>
EIGEN_STRONG_INLINE Packet2l pset1<Packet2l>(const int64_t& from) {
Packet2l v = {from, from};
return v;
}
template <>
EIGEN_STRONG_INLINE Packet2d pset1frombits<Packet2d>(unsigned long from) {

View File

@ -741,6 +741,7 @@ EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet
psincos_double(const Packet& x) {
typedef typename unpacket_traits<Packet>::integer_packet PacketI;
typedef typename unpacket_traits<PacketI>::type ScalarI;
const Packet cst_sign_mask = pset1frombits<Packet>(static_cast<Eigen::numext::uint64_t>(0x8000000000000000u));
@ -751,7 +752,7 @@ EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
const Packet cst_2oPI = pset1<Packet>(0.63661977236758134307553505349006); // 2/PI
// Integer Packet constants
const PacketI cst_one = pset1<PacketI>(1);
const PacketI cst_one = pset1<PacketI>(ScalarI(1));
// Constant for splitting
const Packet cst_split = pset1<Packet>(1 << 24);