From 96e30e936a32fdb44ec519403031a56e5fc501fd Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Thu, 2 May 2019 14:11:01 -0700 Subject: [PATCH] Add masked pstoreu for Packet16h --- Eigen/src/Core/arch/GPU/PacketMathHalf.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Eigen/src/Core/arch/GPU/PacketMathHalf.h b/Eigen/src/Core/arch/GPU/PacketMathHalf.h index 2bee56f0f..7fae5995a 100644 --- a/Eigen/src/Core/arch/GPU/PacketMathHalf.h +++ b/Eigen/src/Core/arch/GPU/PacketMathHalf.h @@ -611,6 +611,11 @@ template<> EIGEN_STRONG_INLINE void pstoreu(Eigen::half* to, const Packet1 _mm256_storeu_si256((__m256i*)(void*)to, from.x); } +template<> EIGEN_STRONG_INLINE void pstoreu(Eigen::half* to, const Packet16h& from, int16_t umask) { + __mmask16 mask = static_cast<__mmask16>(umask); + _mm512_mask_storeu_epi16((__m256i*)(void*)to, mask, from.x); +} + template<> EIGEN_STRONG_INLINE Packet16h ploaddup(const Eigen::half* from) { Packet16h result;