mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 01:29:35 +08:00
Fix build with clang on Windows.
This commit is contained in:
parent
45b40d91ca
commit
d3ef7cf03e
@ -904,16 +904,6 @@ struct scalar_logistic_op {
|
|||||||
return pdiv(one, padd(one, pexp(pnegate(x))));
|
return pdiv(one, padd(one, pexp(pnegate(x))));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename T>
|
|
||||||
struct functor_traits<scalar_logistic_op<T> > {
|
|
||||||
enum {
|
|
||||||
Cost = NumTraits<T>::AddCost * 2 + NumTraits<T>::MulCost * 6 +
|
|
||||||
scalar_div_cost<T, packet_traits<T>::HasDiv>::value +
|
|
||||||
functor_traits<scalar_exp_op<T> >::Cost,
|
|
||||||
PacketAccess = packet_traits<T>::HasAdd && packet_traits<T>::HasDiv &&
|
|
||||||
packet_traits<T>::HasNegate && packet_traits<T>::HasExp
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/** \internal
|
/** \internal
|
||||||
* \brief Template specialization of the logistic function for float.
|
* \brief Template specialization of the logistic function for float.
|
||||||
@ -978,15 +968,20 @@ struct scalar_logistic_op<float> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <typename T>
|
||||||
struct functor_traits<scalar_logistic_op<float> > {
|
struct functor_traits<scalar_logistic_op<T> > {
|
||||||
enum {
|
enum {
|
||||||
Cost = NumTraits<float>::AddCost * 12 + NumTraits<float>::MulCost * 11 +
|
Cost = scalar_div_cost<T, packet_traits<T>::HasDiv>::value +
|
||||||
scalar_div_cost<float, packet_traits<float>::HasDiv>::value,
|
(internal::is_same<T, float>::value
|
||||||
PacketAccess = packet_traits<float>::HasAdd &&
|
? NumTraits<T>::AddCost * 12 + NumTraits<T>::MulCost * 11
|
||||||
packet_traits<float>::HasMul &&
|
: NumTraits<T>::AddCost * 2 +
|
||||||
packet_traits<float>::HasDiv &&
|
functor_traits<scalar_exp_op<T> >::Cost),
|
||||||
packet_traits<float>::HasMax && packet_traits<float>::HasMin
|
PacketAccess =
|
||||||
|
packet_traits<T>::HasAdd && packet_traits<T>::HasDiv &&
|
||||||
|
(internal::is_same<T, float>::value
|
||||||
|
? packet_traits<T>::HasMul && packet_traits<T>::HasMax &&
|
||||||
|
packet_traits<T>::HasMin
|
||||||
|
: packet_traits<T>::HasNegate && packet_traits<T>::HasExp)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user