diff options
author | Everton Constantino <everton.constantino@ibm.com> | 2020-03-19 17:31:49 +0000 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-03-19 17:31:49 +0000 |
commit | 6ff5a14091151ce0d722878de93b57025976facb (patch) | |
tree | 4bc892877bc2168f9d47806cc3efbdea0e567c41 /Eigen/src/Core/GenericPacketMath.h | |
parent | 232f9040821db526d28b9d93aaeb45c907dbf06b (diff) |
Reenabling packetmath unsigned tests, adding dummy pabs for relevant unsigned
types.
Diffstat (limited to 'Eigen/src/Core/GenericPacketMath.h')
-rw-r--r-- | Eigen/src/Core/GenericPacketMath.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h index 42d1eb077..13c639f7e 100644 --- a/Eigen/src/Core/GenericPacketMath.h +++ b/Eigen/src/Core/GenericPacketMath.h @@ -195,6 +195,12 @@ pmax(const Packet& a, const Packet& b) { return numext::maxi(a, b); } /** \internal \returns the absolute value of \a a */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pabs(const Packet& a) { using std::abs; return abs(a); } +template<> EIGEN_DEVICE_FUNC inline unsigned int +pabs(const unsigned int& a) { return a; } +template<> EIGEN_DEVICE_FUNC inline unsigned long +pabs(const unsigned long& a) { return a; } +template<> EIGEN_DEVICE_FUNC inline unsigned long long +pabs(const unsigned long long& a) { return a; } /** \internal \returns the phase angle of \a a */ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet |