Added support for fp16 to the sigmoid functor.

This commit is contained in:
Benoit Steiner 2016-05-10 12:25:27 -07:00
parent 0eb69b7552
commit 661e710092

View File

@ -69,7 +69,7 @@ struct scalar_sigmoid_op {
template <typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Packet packetOp(const Packet& x) const {
const Packet one = pset1<Packet>(1);
const Packet one = pset1<Packet>(T(1));
return pdiv(one, padd(one, pexp(pnegate(x))));
}
};