Fixed the assignment operator of the Tensor and TensorMap classes.

This commit is contained in:
Benoit Steiner
2014-07-22 10:31:21 -07:00
parent 40bb98e76a
commit f7bb7ee3f3
2 changed files with 19 additions and 1 deletions

View File

@@ -241,9 +241,16 @@ template<typename PlainObjectType, int Options_> class TensorMap : public Tensor
}
#endif
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Self& operator=(const Self& other)
{
typedef TensorAssignOp<Self, const Self> Assign;
Assign assign(*this, other);
internal::TensorExecutor<const Assign, DefaultDevice>::run(assign, DefaultDevice());
return *this;
}
template<typename OtherDerived>
EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Self& operator=(const OtherDerived& other)
{
typedef TensorAssignOp<Self, const OtherDerived> Assign;