aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2019-01-09 15:36:41 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2019-01-09 15:36:41 +0100
commitaeec68f77b61c2d9fb8323ee7951bff3458d5f3f (patch)
tree72329a90451e882bdf325c5e396635f43ced6911
parente6b217b8ddf533de9bacc46aae2db6de78581056 (diff)
Add missing pcmp_lt and others for AVX512
-rw-r--r--Eigen/src/Core/arch/AVX512/PacketMath.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/Eigen/src/Core/arch/AVX512/PacketMath.h b/Eigen/src/Core/arch/AVX512/PacketMath.h
index 72b09d998..564eb97dc 100644
--- a/Eigen/src/Core/arch/AVX512/PacketMath.h
+++ b/Eigen/src/Core/arch/AVX512/PacketMath.h
@@ -283,9 +283,27 @@ EIGEN_STRONG_INLINE Packet16f cat256(Packet8f a, Packet8f b) {
}
#endif
+template<> EIGEN_STRONG_INLINE Packet16f pcmp_le(const Packet16f& a, const Packet16f& b) {
+ __m256 lo = pcmp_le(extract256<0>(a), extract256<0>(b));
+ __m256 hi = pcmp_le(extract256<1>(a), extract256<1>(b));
+ return cat256(lo, hi);
+}
+
+template<> EIGEN_STRONG_INLINE Packet16f pcmp_lt(const Packet16f& a, const Packet16f& b) {
+ __m256 lo = pcmp_lt(extract256<0>(a), extract256<0>(b));
+ __m256 hi = pcmp_lt(extract256<1>(a), extract256<1>(b));
+ return cat256(lo, hi);
+}
+
+template<> EIGEN_STRONG_INLINE Packet16f pcmp_eq(const Packet16f& a, const Packet16f& b) {
+ __m256 lo = pcmp_eq(extract256<0>(a), extract256<0>(b));
+ __m256 hi = pcmp_eq(extract256<1>(a), extract256<1>(b));
+ return cat256(lo, hi);
+}
+
template<> EIGEN_STRONG_INLINE Packet16f pcmp_lt_or_nan(const Packet16f& a, const Packet16f& b) {
- __m256 lo = _mm256_cmp_ps(extract256<0>(a), extract256<0>(b), _CMP_NGE_UQ);
- __m256 hi = _mm256_cmp_ps(extract256<1>(a), extract256<1>(b), _CMP_NGE_UQ);
+ __m256 lo = pcmp_lt_or_nan(extract256<0>(a), extract256<0>(b));
+ __m256 hi = pcmp_lt_or_nan(extract256<1>(a), extract256<1>(b));
return cat256(lo, hi);
}