From 02bcf9b5918d46016bc88e5e9abebb6caa5a80b7 Mon Sep 17 00:00:00 2001 From: Charles Schlosser Date: Mon, 10 Jun 2024 17:30:22 +0000 Subject: [PATCH] fix scalar pselect --- Eigen/src/Core/GenericPacketMath.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h index e1347b985..8bf8f9035 100644 --- a/Eigen/src/Core/GenericPacketMath.h +++ b/Eigen/src/Core/GenericPacketMath.h @@ -580,21 +580,13 @@ EIGEN_DEVICE_FUNC inline Packet pandnot(const Packet& a, const Packet& b) { } // In the general case, use bitwise select. -template +template struct pselect_impl { static EIGEN_DEVICE_FUNC inline Packet run(const Packet& mask, const Packet& a, const Packet& b) { return por(pand(a, mask), pandnot(b, mask)); } }; -// For scalars, use ternary select. -template -struct pselect_impl::value>> { - static EIGEN_DEVICE_FUNC inline Packet run(const Packet& mask, const Packet& a, const Packet& b) { - return numext::equal_strict(mask, Packet(0)) ? b : a; - } -}; - /** \internal \returns \a or \b for each field in packet according to \mask */ template EIGEN_DEVICE_FUNC inline Packet pselect(const Packet& mask, const Packet& a, const Packet& b) {