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-10 09:14:44 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2014-06-10 09:14:44 -0700
commit925fb6b93710b95082ba44d30405289dff3707eb (patch)
tree004ce9af64e2ffdb9148a286938a2710ee8c2607 /unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h
parenta77458a8ff2a83e716add62253eb50ef64980b21 (diff)
TensorEval are now typed on the device: this will make it possible to use partial template specialization to optimize the strategy of each evaluator for each device type.
Started work on partial evaluations.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h
index 7d5f9271e..e9e74581f 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h
@@ -77,19 +77,19 @@ class TensorReshapingOp : public TensorBase<TensorReshapingOp<XprType, NewDimens
};
-template<typename ArgType, typename NewDimensions>
-struct TensorEvaluator<const TensorReshapingOp<ArgType, NewDimensions> >
+template<typename ArgType, typename NewDimensions, typename Device>
+struct TensorEvaluator<const TensorReshapingOp<ArgType, NewDimensions>, Device>
{
typedef TensorReshapingOp<ArgType, NewDimensions> XprType;
typedef NewDimensions Dimensions;
enum {
- IsAligned = TensorEvaluator<ArgType>::IsAligned,
- PacketAccess = TensorEvaluator<ArgType>::PacketAccess,
+ IsAligned = TensorEvaluator<ArgType, Device>::IsAligned,
+ PacketAccess = TensorEvaluator<ArgType, Device>::PacketAccess,
};
- TensorEvaluator(const XprType& op)
- : m_impl(op.expression()), m_dimensions(op.dimensions())
+ TensorEvaluator(const XprType& op, const Device& device)
+ : m_impl(op.expression(), device), m_dimensions(op.dimensions())
{ }
typedef typename XprType::Index Index;
@@ -111,7 +111,7 @@ struct TensorEvaluator<const TensorReshapingOp<ArgType, NewDimensions> >
private:
NewDimensions m_dimensions;
- TensorEvaluator<ArgType> m_impl;
+ TensorEvaluator<ArgType, Device> m_impl;
};