Added support for fixed sized tensors.

Improved support for tensor expressions.
This commit is contained in:
Benoit Steiner
2014-05-06 11:18:37 -07:00
parent c0f2cb016e
commit 0320f7e3a7
18 changed files with 1319 additions and 82 deletions

View File

@@ -54,7 +54,7 @@ struct nested<TensorCwiseUnaryOp<UnaryOp, XprType>, 1, typename eval<TensorCwise
template<typename UnaryOp, typename XprType>
class TensorCwiseUnaryOp
class TensorCwiseUnaryOp : public TensorBase<TensorCwiseUnaryOp<UnaryOp, XprType> >
{
public:
typedef typename Eigen::internal::traits<TensorCwiseUnaryOp>::Scalar Scalar;
@@ -75,11 +75,6 @@ class TensorCwiseUnaryOp
const typename internal::remove_all<typename XprType::Nested>::type&
nestedExpression() const { return m_xpr; }
/** \returns the nested expression */
EIGEN_DEVICE_FUNC
typename internal::remove_all<typename XprType::Nested>::type&
nestedExpression() { return m_xpr.const_cast_derived(); }
protected:
typename XprType::Nested m_xpr;
const UnaryOp m_functor;
@@ -124,7 +119,7 @@ struct nested<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType>, 1, typename
template<typename BinaryOp, typename LhsXprType, typename RhsXprType>
class TensorCwiseBinaryOp
class TensorCwiseBinaryOp : public TensorBase<TensorCwiseBinaryOp<BinaryOp, LhsXprType, RhsXprType> >
{
public:
typedef typename Eigen::internal::traits<TensorCwiseBinaryOp>::Scalar Scalar;