Added support for vectorized type casting of tensors

This commit is contained in:
Benoit Steiner
2015-02-27 08:46:04 -08:00
parent f41b1f1666
commit 573b377110
9 changed files with 413 additions and 3 deletions

View File

@@ -164,9 +164,9 @@ class TensorBase<Derived, ReadOnlyAccessors>
}
template <typename NewType> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE const TensorCwiseUnaryOp<internal::scalar_cast_op<Scalar, NewType>, const Derived>
EIGEN_STRONG_INLINE const TensorConversionOp<NewType, const Derived>
cast() const {
return unaryExpr(internal::scalar_cast_op<Scalar, NewType>());
return TensorConversionOp<NewType, const Derived>(derived());
}
// Generic binary operation support.