mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fixed the assignment operator of the Tensor and TensorMap classes.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user