Added a method to conjugate the content of a tensor or the result of a tensor expression.

This commit is contained in:
Benoit Steiner
2016-02-11 16:34:07 -08:00
parent 17e93ba148
commit de345eff2e
2 changed files with 26 additions and 0 deletions

View File

@@ -170,6 +170,12 @@ class TensorBase<Derived, ReadOnlyAccessors>
return unaryExpr(internal::scalar_abs_op<Scalar>());
}
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, const Derived>
conjugate() const {
return unaryExpr(internal::scalar_conjugate_op<Scalar>());
}
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_pow_op<Scalar>, const Derived>
pow(Scalar exponent) const {