diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-12-04 09:38:15 -0800 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-12-04 09:38:15 -0800 |
commit | d20efc974d53f513668c0138e945171f6f4d85e8 (patch) | |
tree | 2f19cf888486012527ceb6d0b725ab1ec51b9707 /unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h | |
parent | e25e3a041bc41266df31f48a441d95b38fc5a6fc (diff) |
Made it possible to use the sigmoid functor within a CUDA kernel.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h b/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h index 7ba0c2817..34ba4e392 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h @@ -40,8 +40,8 @@ struct scalar_sigmoid_op { return one / (one + std::exp(-x)); } - template <typename Packet> - inline Packet packetOp(const Packet& x) const { + template <typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + Packet packetOp(const Packet& x) const { const Packet one = pset1<Packet>(1); return pdiv(one, padd(one, pexp(pnegate(x)))); } |