diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-02-21 13:32:13 -0800 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2019-02-21 13:32:13 -0800 |
commit | 4d7f31710299fd869def962f2070c252ae1aaa67 (patch) | |
tree | f068bcdfb8e2c29bb761d5aa19a392a53824b824 /Eigen/src/Core/arch/GPU | |
parent | 2a39659d793fcde656593bbf01948bc0bd568181 (diff) |
Add a few missing packet ops: cmp_eq for NEON. pfloor for GPU.
Diffstat (limited to 'Eigen/src/Core/arch/GPU')
-rw-r--r-- | Eigen/src/Core/arch/GPU/PacketMath.h | 9 |
1 files changed, 9 insertions, 0 deletions
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<float> : default_packet_traits HasBetaInc = 1, HasBlend = 0, + HasFloor = 1, }; }; @@ -86,6 +87,7 @@ template<> struct packet_traits<double> : default_packet_traits HasBetaInc = 1, HasBlend = 0, + HasFloor = 1, }; }; @@ -408,6 +410,13 @@ template<> EIGEN_DEVICE_FUNC inline double2 pabs<double2>(const double2& a) { return make_double2(fabs(a.x), fabs(a.y)); } +template<> EIGEN_DEVICE_FUNC inline float4 pfloor<float4>(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<double2>(const double2& a) { + return make_double2(floor(a.x), floor(a.y)); +} + EIGEN_DEVICE_FUNC inline void ptranspose(PacketBlock<float4,4>& kernel) { float tmp = kernel.packet[0].y; |