aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/AltiVec
diff options
context:
space:
mode:
authorGravatar Joel Holdsworth <joel@airwebreathe.org.uk>2020-03-19 17:24:06 +0000
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2020-03-19 17:24:06 +0000
commit232f9040821db526d28b9d93aaeb45c907dbf06b (patch)
treeef6385880742496420cb4718e11d84baeacfed5f /Eigen/src/Core/arch/AltiVec
parent54aa8fa186e84bc6985f70f9aa43490709f345b7 (diff)
Add shift_left<N> and shift_right<N> coefficient-wise unary Array functions
Diffstat (limited to 'Eigen/src/Core/arch/AltiVec')
-rwxr-xr-xEigen/src/Core/arch/AltiVec/PacketMath.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/Eigen/src/Core/arch/AltiVec/PacketMath.h b/Eigen/src/Core/arch/AltiVec/PacketMath.h
index 154442cf9..95fa887e3 100755
--- a/Eigen/src/Core/arch/AltiVec/PacketMath.h
+++ b/Eigen/src/Core/arch/AltiVec/PacketMath.h
@@ -171,10 +171,11 @@ struct packet_traits<int> : default_packet_traits {
size = 4,
HasHalfPacket = 0,
- HasAdd = 1,
- HasSub = 1,
- HasMul = 1,
- HasDiv = 0,
+ HasAdd = 1,
+ HasSub = 1,
+ HasShift = 1,
+ HasMul = 1,
+ HasDiv = 0,
HasBlend = 1
};
};
@@ -567,9 +568,11 @@ template<> EIGEN_STRONG_INLINE Packet4i preverse(const Packet4i& a)
template<> EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f& a) { return vec_abs(a); }
template<> EIGEN_STRONG_INLINE Packet4i pabs(const Packet4i& a) { return vec_abs(a); }
-template<int N> EIGEN_STRONG_INLINE Packet4i pshiftright(Packet4i a)
+template<int N> EIGEN_STRONG_INLINE Packet4i parithmetic_shift_right(Packet4i a)
+{ return vec_sra(a,reinterpret_cast<Packet4ui>(pset1<Packet4i>(N))); }
+template<int N> EIGEN_STRONG_INLINE Packet4i plogical_shift_right(Packet4i a)
{ return vec_sr(a,reinterpret_cast<Packet4ui>(pset1<Packet4i>(N))); }
-template<int N> EIGEN_STRONG_INLINE Packet4i pshiftleft(Packet4i a)
+template<int N> EIGEN_STRONG_INLINE Packet4i plogical_shift_left(Packet4i a)
{ return vec_sl(a,reinterpret_cast<Packet4ui>(pset1<Packet4i>(N))); }
template<> EIGEN_STRONG_INLINE Packet4f pfrexp<Packet4f>(const Packet4f& a, Packet4f& exponent) {