From a6601070f2cbce560235f68c6b10aa1b5536773c Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Thu, 4 Mar 2021 00:13:36 +0000 Subject: Add log2 operation to TensorBase --- unsupported/Eigen/CXX11/src/Tensor/TensorBase.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'unsupported') 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 @@ -297,6 +297,12 @@ class TensorBase return unaryExpr(internal::scalar_log1p_op()); } + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE const TensorCwiseUnaryOp, const Derived> + log2() const { + return unaryExpr(internal::scalar_log2_op()); + } + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseUnaryOp, const Derived> abs() const { -- cgit v1.2.3