Don't vectorize the MeanReducer unless pdiv is available.

This commit is contained in:
Rasmus Munk Larsen 2018-09-11 14:09:00 -07:00
parent 5da960702f
commit e289f44c56

View File

@ -158,7 +158,8 @@ template <typename T, typename Device>
struct reducer_traits<MeanReducer<T>, Device> {
enum {
Cost = NumTraits<T>::AddCost,
PacketAccess = PacketType<T, Device>::HasAdd && !NumTraits<T>::IsInteger,
PacketAccess = PacketType<T, Device>::HasAdd &&
PacketType<T, Device>::HasDiv && !NumTraits<T>::IsInteger,
IsStateful = true,
IsExactlyAssociative = NumTraits<T>::IsInteger
};