bug #1569: fix Tensor<half>::mean() on AVX with respective unit test.

This commit is contained in:
Gael Guennebaud
2018-07-19 13:15:40 +02:00
parent 1f523e7304
commit 7ccb623746
2 changed files with 22 additions and 21 deletions

View File

@@ -140,7 +140,7 @@ struct reducer_traits<SumReducer<T>, Device> {
template <typename T> struct MeanReducer
{
static const bool PacketAccess = packet_traits<T>::HasAdd && !NumTraits<T>::IsInteger;
static const bool PacketAccess = packet_traits<T>::HasAdd && packet_traits<T>::HasDiv && !NumTraits<T>::IsInteger;
static const bool IsStateful = true;
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE