From 4d7f31710299fd869def962f2070c252ae1aaa67 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Thu, 21 Feb 2019 13:32:13 -0800 Subject: Add a few missing packet ops: cmp_eq for NEON. pfloor for GPU. --- Eigen/src/Core/arch/GPU/PacketMath.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Eigen/src/Core/arch/GPU') diff --git a/Eigen/src/Core/arch/GPU/PacketMath.h b/Eigen/src/Core/arch/GPU/PacketMath.h index c1b097fb9..cd4615a45 100644 --- a/Eigen/src/Core/arch/GPU/PacketMath.h +++ b/Eigen/src/Core/arch/GPU/PacketMath.h @@ -53,6 +53,7 @@ template<> struct packet_traits : default_packet_traits HasBetaInc = 1, HasBlend = 0, + HasFloor = 1, }; }; @@ -86,6 +87,7 @@ template<> struct packet_traits : default_packet_traits HasBetaInc = 1, HasBlend = 0, + HasFloor = 1, }; }; @@ -408,6 +410,13 @@ template<> EIGEN_DEVICE_FUNC inline double2 pabs(const double2& a) { return make_double2(fabs(a.x), fabs(a.y)); } +template<> EIGEN_DEVICE_FUNC inline float4 pfloor(const float4& a) { + return make_float4(floorf(a.x), floorf(a.y), floorf(a.z), floorf(a.w)); +} +template<> EIGEN_DEVICE_FUNC inline double2 pfloor(const double2& a) { + return make_double2(floor(a.x), floor(a.y)); +} + EIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock& kernel) { float tmp = kernel.packet[0].y; -- cgit v1.2.3