diff options
author | Eugene Zhulenev <eugene.zhulenev@gmail.com> | 2021-03-04 00:13:36 +0000 |
---|---|---|
committer | Eugene Zhulenev <eugene.zhulenev@gmail.com> | 2021-03-04 00:13:36 +0000 |
commit | a6601070f2cbce560235f68c6b10aa1b5536773c (patch) | |
tree | 0c50238d89aa591b65f46bda8fc2e5529c67fec3 | |
parent | 9a663973b499a53be3e30eb7521545af820fdfc4 (diff) |
Add log2 operation to TensorBase
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorBase.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h b/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h index 679996c02..35b6458e5 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h @@ -298,6 +298,12 @@ class TensorBase<Derived, ReadOnlyAccessors> } EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_log2_op<Scalar>, const Derived> + log2() const { + return unaryExpr(internal::scalar_log2_op<Scalar>()); + } + + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived> abs() const { return unaryExpr(internal::scalar_abs_op<Scalar>()); |