aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/AVX512
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/AVX512
parent54aa8fa186e84bc6985f70f9aa43490709f345b7 (diff)
Add shift_left<N> and shift_right<N> coefficient-wise unary Array functions
Diffstat (limited to 'Eigen/src/Core/arch/AVX512')
-rw-r--r--Eigen/src/Core/arch/AVX512/PacketMath.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/Eigen/src/Core/arch/AVX512/PacketMath.h b/Eigen/src/Core/arch/AVX512/PacketMath.h
index a53f9bc6a..98a8a5b0f 100644
--- a/Eigen/src/Core/arch/AVX512/PacketMath.h
+++ b/Eigen/src/Core/arch/AVX512/PacketMath.h
@@ -538,7 +538,15 @@ EIGEN_STRONG_INLINE Packet8d pandnot<Packet8d>(const Packet8d& a,const Packet8d&
#endif
}
-template<int N> EIGEN_STRONG_INLINE Packet16i pshiftleft(Packet16i a) {
+template<int N> EIGEN_STRONG_INLINE Packet16i parithmetic_shift_right(Packet16i a) {
+ return _mm512_srai_epi32(a, N);
+}
+
+template<int N> EIGEN_STRONG_INLINE Packet16i plogical_shift_right(Packet16i a) {
+ return _mm512_srli_epi32(a, N);
+}
+
+template<int N> EIGEN_STRONG_INLINE Packet16i plogical_shift_left(Packet16i a) {
return _mm512_slli_epi32(a, N);
}