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.
This commit is contained in:
Antonio Sanchez 2021-07-25 13:39:50 -07:00
parent 66ca41bd47
commit de2e62c62d

View File

@ -206,7 +206,10 @@ struct functor_traits<scalar_cmp_op<LhsScalar,RhsScalar, cmp> > {
enum {
Cost = (NumTraits<LhsScalar>::AddCost+NumTraits<RhsScalar>::AddCost)/2,
PacketAccess = is_same<LhsScalar, RhsScalar>::value &&
packet_traits<LhsScalar>::HasCmp
packet_traits<LhsScalar>::HasCmp &&
// Since return type is bool, we currently require the inputs
// to be bool to enable packet access.
is_same<LhsScalar, bool>::value
};
};