From de2e62c62d234a5723fe27dcaf4282f2aab6d8c7 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Sun, 25 Jul 2021 13:39:50 -0700 Subject: [PATCH] Disable vectorization of comparisons except for bool. Packet input/output types must currently be the same, and since these have a return type of `bool`, vectorization will only work if input is bool. --- Eigen/src/Core/functors/BinaryFunctors.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/functors/BinaryFunctors.h b/Eigen/src/Core/functors/BinaryFunctors.h index 71f894eaf8..fc878155af 100644 --- a/Eigen/src/Core/functors/BinaryFunctors.h +++ b/Eigen/src/Core/functors/BinaryFunctors.h @@ -206,7 +206,10 @@ struct functor_traits > { enum { Cost = (NumTraits::AddCost+NumTraits::AddCost)/2, PacketAccess = is_same::value && - packet_traits::HasCmp + packet_traits::HasCmp && + // Since return type is bool, we currently require the inputs + // to be bool to enable packet access. + is_same::value }; };