mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
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:
parent
66ca41bd47
commit
de2e62c62d
@ -206,7 +206,10 @@ struct functor_traits<scalar_cmp_op<LhsScalar,RhsScalar, cmp> > {
|
|||||||
enum {
|
enum {
|
||||||
Cost = (NumTraits<LhsScalar>::AddCost+NumTraits<RhsScalar>::AddCost)/2,
|
Cost = (NumTraits<LhsScalar>::AddCost+NumTraits<RhsScalar>::AddCost)/2,
|
||||||
PacketAccess = is_same<LhsScalar, RhsScalar>::value &&
|
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
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user