aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/GenericPacketMath.h
diff options
context:
space:
mode:
authorGravatar Antonio Sanchez <cantonios@google.com>2020-05-28 10:41:28 -0700
committerGravatar Antonio Sánchez <cantonios@google.com>2020-06-11 17:26:56 +0000
commita7d2552af8b34f6befba9988c36fe5d9723892e6 (patch)
tree3ca16204e91819de1b8bdf0b9307081b3789de20 /Eigen/src/Core/GenericPacketMath.h
parent463ec866483806640c0a589afa427193a4599e8e (diff)
Remove HasCast and fix packetmath cast tests.
The use of the `packet_traits<>::HasCast` field is currently inconsistent with `type_casting_traits<>`, and is unused apart from within `test/packetmath.cpp`. In addition, those packetmath cast tests do not currently reflect how casts are performed in practice: they ignore the `SrcCoeffRatio` and `TgtCoeffRatio` fields, assuming a 1:1 ratio. Here we remove the unsed `HasCast`, and modify the packet cast tests to better reflect their usage.
Diffstat (limited to 'Eigen/src/Core/GenericPacketMath.h')
-rw-r--r--Eigen/src/Core/GenericPacketMath.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h
index 7f35b3114..cb8848731 100644
--- a/Eigen/src/Core/GenericPacketMath.h
+++ b/Eigen/src/Core/GenericPacketMath.h
@@ -96,7 +96,6 @@ struct default_packet_traits
HasRint = 0,
HasFloor = 0,
HasCeil = 0,
- HasCast = 0,
HasSign = 0
};
};
@@ -325,7 +324,7 @@ pcmp_eq(const Packet& a, const Packet& b) { return a==b ? ptrue(a) : pzero(a); }
/** \internal \returns a < b or a==NaN or b==NaN as a bit mask */
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
-pcmp_lt_or_nan(const Packet& a, const Packet& b) { return a>=b ? pzero(a) : ptrue(a); }
+pcmp_lt_or_nan(const Packet& a, const Packet& b) { return a>=b ? pzero(a) : ptrue(a); }
/** \internal \returns \a or \b for each field in packet according to \mask */
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
@@ -392,7 +391,7 @@ ploaddup(const typename unpacket_traits<Packet>::type* from) { return *from; }
* For instance, for a packet of 8 elements, 2 scalars will be read from \a *from and
* replicated to form: {from[0],from[0],from[0],from[0],from[1],from[1],from[1],from[1]}
* Currently, this function is only used in matrix products.
- * For packet-size smaller or equal to 4, this function is equivalent to pload1
+ * For packet-size smaller or equal to 4, this function is equivalent to pload1
*/
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
ploadquad(const typename unpacket_traits<Packet>::type* from)