mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-06 10:44:05 +08:00
Added support for fp16 to the sigmoid functor.
This commit is contained in:
parent
0eb69b7552
commit
661e710092
@ -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))));
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user