Fix preverse for PowerPC.

This commit is contained in:
Chip Kerchner 2024-04-03 20:09:06 +00:00 committed by Rasmus Munk Larsen
parent c5b234196a
commit be54cc8ded

View File

@ -94,9 +94,7 @@ static Packet16uc p16uc_COUNTDOWN = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1
static Packet16uc p16uc_REVERSE32 = {12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3};
static Packet16uc p16uc_REVERSE16 = {14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1};
#ifndef _ARCH_PWR9
static Packet16uc p16uc_REVERSE8 = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
#endif
#ifdef _BIG_ENDIAN
static Packet16uc p16uc_DUPLICATE32_HI = {0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7};
@ -1928,19 +1926,11 @@ EIGEN_STRONG_INLINE Packet8us preverse(const Packet8us& a) {
}
template <>
EIGEN_STRONG_INLINE Packet16c preverse(const Packet16c& a) {
#ifdef _ARCH_PWR9
return vec_revb(a);
#else
return vec_perm(a, a, p16uc_REVERSE8);
#endif
}
template <>
EIGEN_STRONG_INLINE Packet16uc preverse(const Packet16uc& a) {
#ifdef _ARCH_PWR9
return vec_revb(a);
#else
return vec_perm(a, a, p16uc_REVERSE8);
#endif
}
template <>
EIGEN_STRONG_INLINE Packet8bf preverse(const Packet8bf& a) {