aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2019-08-08 11:56:08 -0700
committerMiao Wang <miaowang@google.com>2019-08-08 11:56:08 -0700
commita3c44b9514705854fc5b26cb407c3b318f896ad7 (patch)
treed95a7e12cd2ef4e26230179b8e14002df2a5c6f1
parente35be003101ace1c02bca3988a7ec710f6d8f151 (diff)
downloadeigen-a3c44b9514705854fc5b26cb407c3b318f896ad7.tar.gz
Update Eigen to have LogisticReturnType for ArrayCwiseUnaryOp
- Required by TFLite update Test: mm Change-Id: Ia56ec09de9234af8b5dd8eca3316a8a7c00db930
-rw-r--r--Eigen/src/plugins/ArrayCwiseUnaryOps.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Eigen/src/plugins/ArrayCwiseUnaryOps.h b/Eigen/src/plugins/ArrayCwiseUnaryOps.h
index ebaa3f192..6590bea1d 100644
--- a/Eigen/src/plugins/ArrayCwiseUnaryOps.h
+++ b/Eigen/src/plugins/ArrayCwiseUnaryOps.h
@@ -20,6 +20,7 @@ typedef CwiseUnaryOp<internal::scalar_acos_op<Scalar>, const Derived> AcosReturn
typedef CwiseUnaryOp<internal::scalar_asin_op<Scalar>, const Derived> AsinReturnType;
typedef CwiseUnaryOp<internal::scalar_atan_op<Scalar>, const Derived> AtanReturnType;
typedef CwiseUnaryOp<internal::scalar_tanh_op<Scalar>, const Derived> TanhReturnType;
+typedef CwiseUnaryOp<internal::scalar_logistic_op<Scalar>, const Derived> LogisticReturnType;
typedef CwiseUnaryOp<internal::scalar_sinh_op<Scalar>, const Derived> SinhReturnType;
typedef CwiseUnaryOp<internal::scalar_cosh_op<Scalar>, const Derived> CoshReturnType;
typedef CwiseUnaryOp<internal::scalar_square_op<Scalar>, const Derived> SquareReturnType;
@@ -320,6 +321,15 @@ cosh() const
return CoshReturnType(derived());
}
+/** \returns an expression of the coefficient-wise logistic of *this.
+ */
+EIGEN_DEVICE_FUNC
+inline const LogisticReturnType
+logistic() const
+{
+ return LogisticReturnType(derived());
+}
+
/** \returns an expression of the coefficient-wise inverse of *this.
*
* Example: \include Cwise_inverse.cpp