aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2014-06-09 09:45:30 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2014-06-09 09:45:30 -0700
commita669052f12d6d71ba815764d6419726d64fef675 (patch)
treea087876a5b341c0c3f2380d3530579cfbeb25c1c /unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h
parent36a2b2e9dc9368356b3f327a1fb00616397c1e0e (diff)
Improved support for rvalues in tensor expressions.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h
index 3e089fe1e..7d5f9271e 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h
@@ -21,7 +21,7 @@ namespace Eigen {
*/
namespace internal {
template<typename XprType, typename NewDimensions>
-struct traits<TensorReshapingOp<XprType, NewDimensions> >
+struct traits<TensorReshapingOp<XprType, NewDimensions> > : public traits<XprType>
{
// Type promotion to handle the case where the types of the lhs and the rhs are different.
typedef typename XprType::Scalar Scalar;
@@ -81,6 +81,7 @@ template<typename ArgType, typename NewDimensions>
struct TensorEvaluator<const TensorReshapingOp<ArgType, NewDimensions> >
{
typedef TensorReshapingOp<ArgType, NewDimensions> XprType;
+ typedef NewDimensions Dimensions;
enum {
IsAligned = TensorEvaluator<ArgType>::IsAligned,
@@ -95,7 +96,7 @@ struct TensorEvaluator<const TensorReshapingOp<ArgType, NewDimensions> >
typedef typename XprType::CoeffReturnType CoeffReturnType;
typedef typename XprType::PacketReturnType PacketReturnType;
- const NewDimensions& dimensions() const { return m_dimensions; }
+ const Dimensions& dimensions() const { return m_dimensions; }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
{