mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Vectorize tensor.isnan() by using typed predicates.
This commit is contained in:
@@ -443,6 +443,12 @@ pnot(const Packet& a) {
|
||||
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
|
||||
pandnot(const Packet& a, const Packet& b) { return pand(a, pnot(b)); }
|
||||
|
||||
/** \internal \returns isnan(a) */
|
||||
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
|
||||
pisnan(const Packet& a) {
|
||||
return pandnot(ptrue(a), pcmp_eq(a, a));
|
||||
}
|
||||
|
||||
// In the general case, use bitwise select.
|
||||
template<typename Packet, typename EnableIf = void>
|
||||
struct pselect_impl {
|
||||
|
||||
Reference in New Issue
Block a user